GUI Text doesn't render

I’m using version 4.0.0f7, and when I drop a GUI Text object onto my scene, it doesn’t render, in neither the editor nor when I run the game. I’ve positioned the object to ensure that it should be visible, but it just doesn’t render anything.

I notice that the GUI Text object is also no longer in screen coordinates, so I’m quite certain that that is not the problem either.

Why wouldn’t my GUI Text objects be showing up?

1 Answer

1

GUIText objects use viewport coordinates, so the x and y must be between 0 and 1.

I'm not seeing that. If I move my GUIText object a little bit to the right (but still close to the center), the X value shoots well above 1.0.

Assuming the anchor is on the left, the only way an X position greater than 1.0 wouldn't make the GUIText object offscreen and not visible is if the pixel offset X was a large negative value.

Maybe I'm missing something, but this is what I'm seeing: http://snag.gy/aWpSu.jpg

Well, the X position is way past 1.0. Make it between 0 and 1. It doesn't use world space, it uses viewport space.

That doesn't help. And as you can see, making the X 1.0 would put it very close to the center of the screen. If it is as you say that the values are only between 0.0 and 1.0, how would you ever put anything anywhere other than just about dead center?