I’ve searched and searched on an example of how to display, or make and image to display in a GUI Texture, of your character avatar. I have setup a Render Texture and been able to set it to a GUI Texture but it’s transparent and difficult to see. Anyone else know of a way. I really just want to be able to display the modified avatar image in a HUD GUI window.:shock:
I don’t normally bump my own posts but seriously am i the only one that’s ever decided to do this in their game? Surely someone out there has created a similar UI display that shows the players head in it?
Here you go:
Create a Texture2D variable (myTexture2D) and drag your texture in the inspector.
Then somewhere in your OnGUI() method call this :
GUI.Label(new Rect(customRect), myTexture2D);
That’s not what i’m asking. I’m asking how to display the camera image or animated image of the player models head inside of the texture area.
I will not give you the answer but a suggestion: search for minimap creation.
You will need a camera, set what layers you want to render, and how to show the camera into a GUI area… which, in fact, is something easy (but I can’t remember how).
You may find some useful articles here: http://wiki.unity3d.com/index.php/Main_Page
Thanks I figured it out. The solution is using a Render Texture…