null check
This commit is contained in:
parent
ab5a33742a
commit
8835f620e9
@ -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;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user