- Home /
Game view goes crazy (clear flags)?
I'm working on a game that uses NGUI for the obvious reasons. Everything was fine but when I loaded it up again, it looks like this:
It of course, should not.
I've isolated this down to the clear flag setting on multiple cameras. The higher depth cameras are set to "Depth Only" to allow for transparency. If I change that setting to a solid color it seems to work ok but then I can't see other camera views.
At one point I played with the clipping planes of the cameras, which fixed it in the game view but then when I played it, it went like this again.
I'm really at a loss. Any help would be great!
Answer by Statement · Mar 07, 2013 at 04:55 PM
Well, you need at least one clear call that clears the color buffer. Otherwise it could contain whatever stuff. If you clear depth only, then you won't get rid of the junk in there. Have you tried to clear with a transparent color?
camera depth 0 - solid color camera depth 1 - depth only camera depth 2 - depth only
Where would I set a clear all flag?
I currently have this.
$$anonymous$$ain camera is set at Depth Only Clipping plane is near 0.01 Far 1000
Camera 2: Solid Color (color is transparent) Clipping planes Near -2 Far 2
Camera 3: Depth Only Clipping Planes Near -2 Far 2
Camera 4: Depth Only Clipping Planes near -2 Far 2.
Everything looks good when i change these but as soon as I run it, it goes crazy again.
Your answer
![](https://koobas.hobune.stream/wayback/20220613093422im_/https://answers.unity.com/themes/thub/images/avi.jpg)