leegod
July 29, 2020, 2:06pm
1
For first selected UI button for set default for console game controller,
I using,
EventSystem.current.firstSelectedGameObject = gameObject;
EventSystem.current.SetSelectedGameObject(gameObject);
but does these 2 lines should be used both? or can be omit by just 1 (which?) line?
Try it and see ¯_(ツ)_/¯
I think firstSelectedGameObject
only really matters if you set it in the inspector before runtime - it probably gets used in Awake or Start for the EventSystem.
Ryiah
July 30, 2020, 8:06am
3
For setting a UI component as the target when the UI is enabled for the first time use this one.
For moving between UI components use this one.