ui-system-fix #4

Merged
BitterSmile merged 12 commits from ui-system-fix into main 2024-02-12 19:06:53 +01:00
Showing only changes of commit 6b01de0095 - Show all commits

View File

@ -55,9 +55,13 @@ namespace NEG.UI.UnityUi
private void SetDirectionInput() private void SetDirectionInput()
{ {
if (EventSystem.current == null)
{
return;
}
CurrentSelectionSource = SelectionSource.Direction; CurrentSelectionSource = SelectionSource.Direction;
Cursor.visible = false; Cursor.visible = false;
if (EventSystem.current != null && EventSystem.current.currentSelectedGameObject == null) if (EventSystem.current.currentSelectedGameObject == null)
{ {
EventSystem.current.SetSelectedGameObject(((MonoWindow)MonoUiManager.Instance.CurrentMainWindow).DefaultSelectedItem); EventSystem.current.SetSelectedGameObject(((MonoWindow)MonoUiManager.Instance.CurrentMainWindow).DefaultSelectedItem);
return; return;