I’ve got one scene in which the cameras won’t render GUI elements. I’ve tried creating a new camera in the scene and that doesn’t help. I can create a new scene and it works fine. Any ideas?
Thanks!
Jeff
I’ve got one scene in which the cameras won’t render GUI elements. I’ve tried creating a new camera in the scene and that doesn’t help. I can create a new scene and it works fine. Any ideas?
Thanks!
Jeff
Does the camera have a gui layer attached to it? Is the gui layer enabled? Maybe there are multiple cameras and one of the cameras hides the other cameras and that camera doesn’t have a gui layer attached?
Yes.
Yes.
There are multiple cameras, but I’ve tried disabling all others and changing the camera depth, and putting the gui text on both cameras. The only cameras that don’t have a gui layer are the water reflection/refraction cameras, which have a depth of -1.
Jeff
Very occasionally, I’ve seen GUITexts refuse to appear for some cameras after making unrelated changes to scripts, even though everything was previously working perfectly. I don’t know what causes this, but restarting Unity seems to fix it for me.
I’ve tried restarting a few times, that doesn’t seem to be the problem.
Jeff
Hmm…
Send in the project folder via Report bug.app or create the scene from scratch.
OK it’s been sent, Case # 7055. The project folder was pretty large, hopefully it all went through ok.
Thanks!
You don’t want to attach the gui text to the camera itself. Since the position of the transform determines the viewport position, attaching a gui text to the camera will make the text move as soon as the camera moves. And unless your camera is at the world origin, your text will be invisible.
Instead just use Game Object → Create Other → GUI Text, which will create a gui text. If you want to display some text elements only on one camera and other gui on another camera, use layers for that purpose.
That makes sense, I just assumed sine it worked in the one splash screen level I was using it correctly.