Quest UI selected object issue
Posted: Tue Aug 29, 2023 8:12 pm
I am trying to program controller support for a menu. I have it set up so that selecting a quest from the Quest Selection Panel turns off that panel and enables the Main Content Panel. Then there is a back button to return to the previous menu.
I'm having the following issues:
1.
When the Quest has been selected from the quest selection panel, that quest button is set as EventSystem.current.currentSelectedGameObject, and seems to be stuck that was even though that button is now inactive and I am trying to use SetSelectedGameObject to change it to a different button. Is there something overwriting this selection? I can manually click on another button with the mouse but I can't toggle to different buttons from the controller.
2.
When I try to set the first task in the list as the current selection, it doesn't work.
I tried this:
This method has worked for selecting the top object in other lists but in this case, the first several items in the list are always listed as "Missing".
I'm having the following issues:
1.
When the Quest has been selected from the quest selection panel, that quest button is set as EventSystem.current.currentSelectedGameObject, and seems to be stuck that was even though that button is now inactive and I am trying to use SetSelectedGameObject to change it to a different button. Is there something overwriting this selection? I can manually click on another button with the mouse but I can't toggle to different buttons from the controller.
2.
When I try to set the first task in the list as the current selection, it doesn't work.
I tried this:
Code: Select all
activeChildrenTasks = taskList.taskListContainer.GetComponentsInChildren<StandardUIQuestTitleButtonTemplate>();
EventSystem.current.SetSelectedGameObject(null);
EventSystem.current.SetSelectedGameObject(activeChildrenTasks[0].gameObject);