Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: eedok on September 24, 2012, 11:47:10 PM
-
Lost about 40 minutes tracking down this issue with my UITextures causing a NullReferenceException when I built my game for mobile. After a few builds of just debug.logging where the issue occurred I found it was this line in UITexture causing the issue: Shader.Find("Unlit/Texture"); which lead to me to this thread: http://forum.unity3d.com/threads/151413-Unlit-Texture-Null-reference
Fixing it was a matter of putting an empty gameObject in the scene and putting a material with that shader on it, so that it would be included in the build.
Hope I put enough keywords and search terms here for people with this problem that are googling it to save them some time
EDIT: another term: UnityEngine.Material..ctor (UnityEngine.Shader shader)
-
I wonder if this is the reason that one of my UITextures keeps getting set to nothing...
-
I wonder if this is the reason that one of my UITextures keeps getting set to nothing...
An error with UITextures losing their assignment was fixed quite recently - have you got the latest version?