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 8835f620e9 - Show all commits

View File

@ -57,7 +57,7 @@ namespace NEG.UI.UnityUi
{ {
CurrentSelectionSource = SelectionSource.Direction; CurrentSelectionSource = SelectionSource.Direction;
Cursor.visible = false; Cursor.visible = false;
if (EventSystem.current.currentSelectedGameObject == null) if (EventSystem.current != null && EventSystem.current.currentSelectedGameObject == null)
{ {
EventSystem.current.SetSelectedGameObject(((MonoWindow)MonoUiManager.Instance.CurrentMainWindow).DefaultSelectedItem); EventSystem.current.SetSelectedGameObject(((MonoWindow)MonoUiManager.Instance.CurrentMainWindow).DefaultSelectedItem);
return; return;