Hey, I just wanted to point out an obscure bug I finally tracked down. Occasionally on my mobile device, the foreground NGUI widgets would fail to show up when loading a level etc. and I couldn't find the root cause. It finally reproduced itself in the editor, where I found out the camera responsible for those widgets had somehow had it's culling mask reset. I have no idea how it's happening, because I load those cameras in as prefabs at launch and don't touch them. My setup is as follows.
I have my main camera rendering my game objects, and two UICameras handling my UI (one for the background, and one for the foreground) which basically sandwich the main camera. Each of the UI cameras is on it's own layer, and their culling mask is set to that layer. They are both children of UI root, and whenever I add a panel/widget to those layers, I parent them to their respective camera. The root is marked DontDestroyOnLoad so it persists through scene changes. Whenever I add widgets/panels I use NGUITools.AddChild, and whenever I dispose of them I call NGUITools.Destroy.
Anyway, as far as I can tell I'm not making any calls that would affect the culling mask being changed. Any ideas on what the issue could be, or how I might go about fixing it? So far I think I'm just going to have to make sure they are set properly each update.
Thanks!