playMaker

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

phannDOTde

  • Full Member
  • ***
  • Posts: 233
    • View Profile
    • Peter Hann .de
How to set focus on an UGUI Button at runtime?
« on: June 29, 2015, 08: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: 2280
    • View Profile
    • jinxtergames
Re: How to set focus on an UGUI Button at runtime?
« Reply #1 on: June 29, 2015, 09:00:44 AM »
maybe this is what you are looking for.
(check the reply from terry)

phannDOTde

  • Full Member
  • ***
  • Posts: 233
    • View Profile
    • Peter Hann .de
Re: How to set focus on an UGUI Button at runtime?
« Reply #2 on: June 29, 2015, 09:40:47 AM »
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