How Do I Access a Material by Name in the BGE?

I want to adjust its “use_shadeless” property dynamically. KX_GameObject doesn’t have the “material_slots” property that bpy_types.Object has, and all I can seem to do so far is get its ID with bge.texture.materialID.

You can’t access material.
You can’t change a material.

You can replace a mesh with another mesh. Meshes include materials. So you replace the material with the mesh.