- Home /
 
               Question by 
               Dimling · Apr 16, 2014 at 07:07 PM · 
                materialshadersmesh renderererrormessage  
              
 
              Material on mesh
Hey all.
I just have a short question. When i try to drag a material (tried all the different shaders) on top of a "Mesh Renderer" I only get this error message:
Shader wants normals, but the mesh nameOfMeshObject doesn't have them
Does anyone know a fix?
Thanks!
               Comment
              
 
               
              Is this a mesh you created through script? Use RecalculateNormals(); . Is this a mesh you imported? Set the Normals to Calculate in the $$anonymous$$odel tab.
Thanks for the reply.
You think like this?
     emptyGameObject.renderer.material = Resources.Load("mat") as $$anonymous$$aterial;
                 mesh.RecalculateNormals();
It made the error message disappear, but still can't see the material on the mesh. Just now i tried to change the diffuse to "sprite/default" and it appeared, but ruined the material. So i guess i have to figure out which of the choices that work.
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                