|
I have an existing GameObject, I add a GUIText component, and give it text. Nothing shows on the screen. If I create a GUIText GameObject it works fine, but it does not work when I add it as a component to an existing object. I've tried giving it a material (with Text Shader) and font, still just does not show up. Thanks! EDIT: The Object to which I added the GUIText component is in the camera's view (very close to 0,0,0).
(comments are locked)
|
|
GUIText uses viewport coordinates on, i.e. 0.0 to 1.0 on x and y axes, z is used for ordering. I'm not sure what you mean. What would I need to do settings wise for the GUIText to get it to show? Thanks.
Dec 14 '10 at 11:07 PM
spaceshooter
Set the transform.position to somewhere between 0 and 1 on the x and y axes.
Dec 14 '10 at 11:23 PM
Eric5h5
aha! I see now, thanks!
Dec 14 '10 at 11:51 PM
spaceshooter
Have an addon question for you. I've gotten the text to show using the GUItextponent, but I had to use WorldToViewportPoint which ends up moving the actual object elsewhere. Is there any way I can keep the object where it is and how the GUItext?
Dec 15 '10 at 12:02 AM
spaceshooter
The GUIText should be a separate object, rather than a component of an existing object.
Dec 15 '10 at 12:45 AM
Eric5h5
(comments are locked)
|
