1
\$\begingroup\$

Currently I've got a little 2.5D platformer with the camera tracking the player. Now when I go to insert a GUITexture or GUIText game object into the scene, it comes up absolutely fine in the Editor view, but when I go to play it there's absolutely nothing to be seen!

At first I thought it may have been a script I was using on the GUI, but I've tried it out with a completely bland GUITexture object that has no interaction with the rest of the game and I still get the same effect. I'm wondering if my camera is messing it up somehow, but I assumed that all GUI objects are drawn to screen space and just stay with the camera.

I've been really stuck for the past few hours so if any one could offer some insight, I'd be very, very grateful!

~Ray

\$\endgroup\$
5
\$\begingroup\$

I can safely say that I am an idiot :)

Somehow, my camera got rid of the GUILayer component. Creating a new camera from scratch with all the prefabricated components fixed it.

I'll leave this here for posterity's sake, since this would be a pretty obscure thing to go wrong and there isn't any documentation I found on it.

But if a moderator feels differently, then they can close it :)

\$\endgroup\$
2
1
\$\begingroup\$

Make sure that you have selected a Game view like below:

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.