Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: kwelts on July 24, 2012, 10:37:12 AM
-
Hey there,
So I recently made 3 atlases with custom textures (1 reference one and 2 other regular ones), but when i run my code that gets the reference to change references between the other 2 i get the following error:
"Shader wants tangents, but the mesh Mesh0 for Refractive Atlas doesn't have them"
"Shader wants normals, but the mesh Mesh0 for Refractive Atlas doesn't have them"
"Shader wants tangents, but the mesh Mesh1 for Refractive Atlas doesn't have them"
"Shader wants normals, but the mesh Mesh1 for Refractive Atlas doesn't have them"
I didnt make anything called Mesh0 or Mesh1 and in the Atlases I made, i dont see where I'm using the refractive Atlases.
Any help would be much appreciated.
-
At your UIBase Panel there is an option for generating normals. (Maybe called "UI Root (2D)")
-
Is the Shader of your atlas "Unlit/Transparent Colored"?
It sounds like your atlas is using a shader that is bump or parallax mapping, which would throw that kind of warning if you don't have a corresponding texture assigned for the bump map or height field texture.
-
the shader of my atlas is "unlit/transparent colored"
my main panel has the generating normals field unchecked. I checked it to try it out and nothing changed.
the error had a bit more to it, i did not notice this. after the error it says "UnityEditor.DockArea:OnGUI()" if that means anything.
-
To make NGUI generate normals, select the UIPanel and check the appropriate checkbox. However if you're getting this warning it means you're not using Unlit/Transparent Colored somewhere, but a different, lit shader. You mentioned refractive earlier -- refractive shader requires normals.
-
Same problem here, I found the checkbox, but am unable to check it off: http://screencast.com/t/HBlRBvYr - am I in the right place here or why would this be unselectable? If it matters, none of the checkboxes allow for a change of value except "Panel Tool".
-
Are you using Unity 4 beta? There is a bug in it that prevents you from clicking checkboxes.
-
That'd be the problem then :). WOW - that's some regression lol!
-
Reviving this ancient thread.
So i started coming across this today in unity 4.3.4...
except ONLY after pausing the game. i have no idea why this makes a difference.
Fine before... not fine after...
looking at the materials, it appears to still be pointing at the unlit shader, though I can't examine the instanced materials created internally by NGUI.
note i'm still on the older version of NGUI not the major overhaul version.
-
There isn't much I can do about older versions of NGUI.
-
Happened to me also and google brought me here. Turned out to be the inspector. Oops.