Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: phannDOTde on June 29, 2015, 11:43:38 AM

Title: How to set focus on an UGUI Button at runtime?
Post by: phannDOTde on June 29, 2015, 11:43:38 AM
I saw that pre-setting an Button as "first selected" in the event system works fine but how do I switch that "first selected" object at runtime? Found this in the Unity DB http://docs.unity3d.com/460/Documentation/ScriptReference/EventSystems.EventSystem.SetSelectedGameObject.html (http://docs.unity3d.com/460/Documentation/ScriptReference/EventSystems.EventSystem.SetSelectedGameObject.html)

but I can't find any suitable uGUI PM action since "set property doesn't work (the "first selected" seems to be initialized only once at startup)- maybe I'm looking for the wrong thing?

Title: Re: How to set focus on an UGUI Button at runtime?
Post by: djaydino on June 29, 2015, 12:00:44 PM
maybe this  (http://hutonggames.com/playmakerforum/index.php?topic=8452.30)is what you are looking for.
(check the reply from terry)
Title: Re: How to set focus on an UGUI Button at runtime?
Post by: phannDOTde on June 29, 2015, 12:40:47 PM
Hey Dino,
thanks for the quick answer/pointing me there - sadly it didn't help so far but I replied on that post of terri, maybe he got an solution I'm overseeing.

/peter