Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: santelia on April 09, 2012, 12:47:19 PM
-
Let's say I have a GUI texture with the background texture for all the user informations (you know: health, goals reached, points, energy, etc). That texture is put in a corner of the screen using the "draw texture" action with appropriate values, after an "enable GUI" action. What can I do if I want to draw something over it, as a layer (health bar, statistics, points, etc). How can I overlap more than one texture? The draw bar is a flat texture stretched to fit a given dimension. The other informations will be number, text, little icons. Any help?
-
If the Draw Texture actions are in the same FSM, they get executed in order. If they're on different FSMs, controlling their draw order is a little trickier. You could try playing with Set GUI Depth.
Otherwise you might consider using GUITexture GameObjects instead, since you can set their draw order in the Unity inspector using the Z position on the Transform component (negative moves forward, positive moves backwards).
-
Z position... interesting trick. Thx
-
When you set a Gui Depth for an element (texture, text, etc), will it be assigned through the entire scene as a global variable, or it's limited to a single FSM?
-
All PlayMaker GUI actions are called in a single OnGUI call in PlayMakerGUI. So it should be global. But again, the order of GUI actions on different FSMs is hard to control...
-
I'm guessing this is a duplicate of this question:
http://hutonggames.com/playmakerforum/index.php?topic=1362.0
We've talked through a few different ways to do this, so I'll mark it solved...