- Home /
What is rendered when no camera is in the scene?
I have a scene with a game object that has no visual components but does have a MonoBehavior extenned class (i.e. a script) with OnGUI override. The OnGUI override is simple. It has a couple of GUI.Label calls. The scene does not have a camera. It appears that controls from the GUI class get rendered but no repaint or clear is done. If the string for the label is changed during runtime, the new string is written on top of the prior string. Can anyone explain this behavior? I'd like to understand what happens in the frame refresh under these conditions.
Answer by Jessy · Feb 09, 2011 at 04:37 PM
It's the same as Don't Clear. The contents of the framebuffer will stick around. Long story short, you always need a camera clearing to something more useful. Unfortunately, the Editor's Game View, with its grey background, is not particularly helpful for demonstrating that.