Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Kaneydien on October 01, 2013, 09:42:05 PM

Title: GUI Depth, does it work?
Post by: Kaneydien on October 01, 2013, 09:42:05 PM
Hi everyone. I saw some old posts from years back about this. I was just messing around playmaker and trying to set up some buttons and set the gui depth with that action, but it does not seem to be working. Also, once you put in a gui depth action, the preview stops working(very annoying!). Does anyone know if there is a way to get this working?
Title: Re: GUI Depth, does it work?
Post by: Alex Chouls on October 02, 2013, 09:06:48 AM
GUI Depth should work, but it's tricky. The way it's designed in Unity, GUI Depth sets the depth for all GUI implemented by a script. So each script can have it's own GUI Depth.

Playmaker optimizes Unity's built in GUI by combining all GUI calls in PlayMakerGUI, in one OnGUI call. This is a massive optimization, but it breaks GUI Depth. When you use the GUI Depth action it pulls those GUI calls out of PlayMakerGUI so their depth can be set separately. But again, you set the depth for all GUI in a PlayMakerFSM, not for each control (not sure if that's what you're trying to do).

Unfortunately pulling GUI out of PlayMakerGUI breaks the realtime preview of that GUI. We'll try to fix that in an update...