Author Topic: Weird error, NGUI does not show any controls  (Read 3744 times)

Martin Schultz

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 37
    • View Profile
    • Decane
Weird error, NGUI does not show any controls
« on: April 07, 2014, 10:05:28 AM »
Hi. I've run into a weird error that NGUI does not display anything anymore. I had it with the recent version 3.5.6, but also with the previous version. Unity boots up and shows only the frames of the ngui elements. What I see in the Unity console log is this:

=====================

[font=courieUnloading 122 unused Assets to reduce memory usage. Loaded Objects now: 4919.
Total: 57.483337 ms (FindLiveObjects: 0.249918 ms CreateObjectMapping: 0.057917 ms MarkObjects: 7.751153 ms  DeleteObjects: 1.659730 ms)

Load native extension module: /Applications/Unity/Unity.app/Contents/PlaybackEngines/iPhonePlayer/EditorExtensions/UnityEditor.iOS.Extensions.Native.dylib
NullReferenceException: Object reference not set to an instance of an object
  at UISprite.SlicedFill (.BetterList`1 verts, .BetterList`1 uvs, .BetterList`1 cols) [0x00000] in /Users/Martin/Development/iOS/Gods of Drifting/Assets/NGUI/Scripts/UI/UISprite.cs:669
  at UISprite.OnFill (.BetterList`1 verts, .BetterList`1 uvs, .BetterList`1 cols) [0x0016d] in /Users/Martin/Development/iOS/Gods of Drifting/Assets/NGUI/Scripts/UI/UISprite.cs:517
  at UIWidget.UpdateGeometry (Int32 frame) [0x00088] in /Users/Martin/Development/iOS/Gods of Drifting/Assets/NGUI/Scripts/Internal/UIWidget.cs:1394
  at UIPanel.UpdateWidgets () [0x00213] in /Users/Martin/Development/iOS/Gods of Drifting/Assets/NGUI/Scripts/UI/UIPanel.cs:1418
  at UIPanel.UpdateSelf () [0x00017] in /Users/Martin/Development/iOS/Gods of Drifting/Assets/NGUI/Scripts/UI/UIPanel.cs:1097
  at UIPanel.LateUpdate () [0x00020] in /Users/Martin/Development/iOS/Gods of Drifting/Assets/NGUI/Scripts/UI/UIPanel.cs:1056
 
(Filename: Assets/NGUI/Scripts/UI/UISprite.cs Line: 669)

Refresh, detecting if any assets need to be imported or removed ... 0.020233 seconds (Nothing changed)
NullReferenceException: Object reference not set to an instance of an object
  at UISprite.SlicedFill (.BetterList`1 verts, .BetterList`1 uvs, .BetterList`1 cols) [0x00000] in /Users/Martin/Development/iOS/Gods of Drifting/Assets/NGUI/Scripts/UI/UISprite.cs:669
  at UISprite.OnFill (.BetterList`1 verts, .BetterList`1 uvs, .BetterList`1 cols) [0x0016d] in /Users/Martin/Development/iOS/Gods of Drifting/Assets/NGUI/Scripts/UI/UISprite.cs:517
  at UIWidget.UpdateGeometry (Int32 frame) [0x00088] in /Users/Martin/Development/iOS/Gods of Drifting/Assets/NGUI/Scripts/Internal/UIWidget.cs:1394
  at UIPanel.UpdateWidgets () [0x00213] in /Users/Martin/Development/iOS/Gods of Drifting/Assets/NGUI/Scripts/UI/UIPanel.cs:1418
  at UIPanel.UpdateSelf () [0x00017] in /Users/Martin/Development/iOS/Gods of Drifting/Assets/NGUI/Scripts/UI/UIPanel.cs:1097
  at UIPanel.LateUpdate () [0x00020] in /Users/Martin/Development/iOS/Gods of Drifting/Assets/NGUI/Scripts/UI/UIPanel.cs:1056
 
(Filename: Assets/NGUI/Scripts/UI/UISprite.cs Line: 669)
 

Refresh, detecting if any assets need to be imported or removed ... 0.140309 seconds (Nothing changed)
Refresh, detecting if any assets need to be imported or removed ... 0.020390 seconds (Nothing changed)[/font]
=====================

Any idea how I can solve this?

Thanks
Martin

Martin Schultz

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 37
    • View Profile
    • Decane
Re: Weird error, NGUI does not show any controls
« Reply #1 on: April 07, 2014, 10:48:39 AM »
I think I found it. mSprite was null because NGUI crashed while creating the Atlas, which I hadn't noticed. The atlas got corrupted so no sprites were there.