Unity 5.1.3p2
NGUI 3.9.2
Having issue that started to appear on iOS, not in Unity Editor. Any advice?
As you can see in the log the txtScore is set.
iOS Crash
-----------
set #1
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 65)
val txt Score (UILabel)
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 65)
NullReferenceException: A null value was found where an object instance was required.
at NGUIText.Prepare (System.String text) [0x00000] in <filename unknown>:0
at UILabel.ProcessText (Boolean legacyMode, Boolean full) [0x00000] in <filename unknown>:0
at UILabel.set_text (System.String value) [0x00000] in <filename unknown>:0
at ScreenScore+<ShowNow>c__Iterator28.MoveNext () [0x00000] in <filename unknown>:0
Unity Code: ScreenScore.cs
------------
Debug.Log ("set #1");
Debug.Log (" val "+ txtScore);
txtScore.text = "0"; <!-- seems to be crashing here
Debug.Log ("set #2 "+txtScoreTop);
txtScoreTop.text = "0";