- Home /
How do I make a GUI display inside a Plane GameObject?
I have my GUI made but I do not know how to anchor it inside my Plane GameObject. I am trying to use the Plane as a background so that I can move the GUI where ever I want.
Answer by jt78 · Oct 21, 2013 at 07:35 PM
A bit more detail would be useful.. are you talking about the Doom 3 style of interactive GUIs on world objects?
If thats what you mean then I'm pretty sure Unity does not support this out of the box. You'd need to use a third party solution or roll your own - the basic idea is that you would render your GUI to a texture and then simply set that as the texture for the plane. However, as a far as I know Unity doesn't allow you to render a built in GUI to a texture directly and mouse interactivity might be a problem.
If you're just trying to keep the GUI on a 2D screen layer though and move it around so that it's positioned relative to a GameObject's position on the screen thats very simple using a GUI Window and the Camera.WorldToScreenPoint function to keep that window's origin as the point on the screen if that makes sense.
http://docs.unity3d.com/Documentation/ScriptReference/Camera.WorldToScreenPoint.html
the GUI is a multiple choose question that I want to show on the plane itself so that I can move it around if I add a picture or model to a question
that said yes something like Doom 3 would be nice but the world is not perfect
and how can this be an accepted answer if it doesn't answer the question