- Home /
Camera unchecking default culling mask by itself after update to Unity 5
I just updated to Unity 5 and for some reason my cameras are unchecking the default culling mask when I start my game (the other layers stay checked). The culling mask on Awake and Start still has "default" selected but somewhere after that it gets removed. I have no idea what's going on.
Answer by JeffBert · Dec 10, 2015 at 06:35 PM
I found out that NGUI was causing this. I was instantiating widgets using Instantiate instead of NGUITools.AddChild. The widgets would then have no panel, so NGUI would create one for them. The UIRoot that was created had the default layer unchecked and would then cause all other cameras to uncheck the default layer too.
Answer by phil_me_up · Dec 08, 2015 at 12:01 PM
Search your project code for any instance of ".cullingMask". Hopefully you'll find something which is changing it and you can simply remove that call, or edit it as needed.
I'm not changing the culling mask by script. The upgrade from 4.6.8 to 5.2.2 hasn't been great to say the least.