Hey guys,
Does anyone know if there’s a way to extract the Selectable to be selected after a Move event from the “Automatic” Navigation type?
Motivation:
I’m extending both EventSystem and BaseInputModue for a two-player character selection screen. As such, I need to replace the standard EventSystem’s “currentSelectedObject” to keep track of multiple selections. While it seems to be working, I can’t manage to find which object will be selected after sending my moveHandler.
My (failing) code:
CharacterSelectionEventSystem eventSystem = GetComponent<CharacterSelectionEventSystem>();
ExecuteEvents.Execute(eventSystem.GetSelectedGameObject(0), axisEventData[i], ExecuteEvents.moveHandler);
Debug.Log(testBtn.navigation.selectOnRight); //prints null
GameObject rightSelectable = eventSystem.GetSelectedGameObject(0).GetComponent<Button>().navigation.selectOnRight.gameObject; //selectable
eventSystem.SetSelectedGameObject(0, rightSelectable);
Thanks in advance as always,
Patrick