Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

How to solve this: Shader wants normals, but the mesh SpriteManager doesn't have them

Discussion in 'Scripting' started by ashmira, Apr 4, 2011.

  1. ashmira

    ashmira

    Joined:
    Oct 19, 2010
    Posts:
    18
    I'm a starter in SpriteManager... So after setting up the SpriteManger correctly, I got this error:

    Code (csharp):
    1. Shader wants normals, but the mesh SpriteManager doesn't have them
    2. UnityEditor.DockArea:OnGUI()
    I'm using the Transparent/DIffuse shader... and literally most of the shaders in the Transparent column.
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,400
    You can't use shaders that want normals (as the error says). Use an unlit shader.

    --Eric
     
  3. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,571
    I'm getting the same kind of error and am using unlit shaders. It isn't happening when I play the game, only when I select a model in the Project view. I assume I can ignore these errors? EDIT: The model disappears from the Preview pane in the Inspector when I turn off the Normals.

    I turned off the Normals generation in the models as a test. I didn't notice much difference. Should I have done? My thinking was the fewer things present, the less processing required. But I wondered if this generates more work elsewhere? Or if the shader doesn't use the normals, then it makes no difference?
     
    Last edited: Nov 11, 2011
  4. Serve

    Serve

    Joined:
    Nov 8, 2012
    Posts:
    13
    From my experience, this can also happen when you have deleted a material used by a game object like a text mesh which is still pointing to a deleted font material. I had exactly the same issue until I discovered that I had such a game object.