playMaker

Author Topic: How to set focus on an UGUI Button at runtime?  (Read 2069 times)

phannDOTde

  • Full Member
  • ***
  • Posts: 237
    • Peter Hann .de
How to set focus on an UGUI Button at runtime?
« 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

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?


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: How to set focus on an UGUI Button at runtime?
« Reply #1 on: June 29, 2015, 12:00:44 PM »
maybe this is what you are looking for.
(check the reply from terry)

phannDOTde

  • Full Member
  • ***
  • Posts: 237
    • Peter Hann .de
Re: How to set focus on an UGUI Button at runtime?
« Reply #2 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