Not sure if this is the place for bug reports, but I didn't see any other place, so here it is!
First off, I got this a couple times in the editor while switching between panels. Not sure if it is a problem with the way I'm doing something, but it had worked previously with NGUI 2.x:
NullReferenceException
UnityEngine.Material..ctor (UnityEngine.Shader shader)
UIDrawCall.CreateMaterial () (at Assets/Foundation/NGUI/Scripts/Internal/UIDrawCall.cs:310)
UIDrawCall.RebuildMaterial () (at Assets/Foundation/NGUI/Scripts/Internal/UIDrawCall.cs:325)
UIDrawCall.UpdateMaterials () (at Assets/Foundation/NGUI/Scripts/Internal/UIDrawCall.cs:347)
UIDrawCall.Set (.BetterList`1 verts, .BetterList`1 norms, .BetterList`1 tans, .BetterList`1 uvs, .BetterList`1 cols) (at Assets/Foundation/NGUI/Scripts/Internal/UIDrawCall.cs:470)
UIPanel.SubmitDrawCall (.UIDrawCall dc) (at Assets/Foundation/NGUI/Scripts/UI/UIPanel.cs:1042)
UIPanel.FillAllDrawCalls () (at Assets/Foundation/NGUI/Scripts/UI/UIPanel.cs:999)
UIPanel.UpdateSelf () (at Assets/Foundation/NGUI/Scripts/UI/UIPanel.cs:939)
UIPanel.LateUpdate () (at Assets/Foundation/NGUI/Scripts/UI/UIPanel.cs:893)
Second, I started getting an issue from time to time on Android, though not sure if it's platform-specific. It wasn't happening in the editor though. When a panel is not on screen, I disable it or enable it using this code:
public static void SetPanelsEnabled(GameObject parent, bool enabled)
{
if(parent == null) { return; }
// Enable/disable panel elements.
UIPanel[] panels = parent.GetComponentsInChildren<UIPanel>(true);
for(int i = 0; i < panels.Length; ++i)
{
panels[i].enabled = enabled;
}
}
However, I get this error on device if I use that code:
I/Unity (28837): NullReferenceException: Object reference not set to an instance of an object
I/Unity (28837): at UIPanel.FindDrawCall (.UIWidget w) [0x00098] in /Projects/TicTactics/Assets/Foundation/NGUI/Scripts/UI/UIPanel.cs:1301
I/Unity (28837): at UIPanel.UpdateWidgets () [0x0010b] in /Projects/TicTactics/Assets/Foundation/NGUI/Scripts/UI/UIPanel.cs:1269
I/Unity (28837): at UIPanel.UpdateSelf () [0x00017] in /Projects/TicTactics/Assets/Foundation/NGUI/Scripts/UI/UIPanel.cs:934
I/Unity (28837): at UIPanel.LateUpdate () [0x00020] in /Projects/TicTactics/Assets/Foundation/NGUI/Scripts/UI/UIPanel.cs:893
When I removed the calls to enable/disable the panels when showing/hiding the screens, this error no longer showed up.
Not sure if that's helpful, but hopefully it can give you some clues.