浏览代码

Add control over mouse click unselecting UI element

/main
uChema 4 年前
当前提交
6b4ea95d
共有 2 个文件被更改,包括 10 次插入2 次删除
  1. 10
      UOP1_Project/Assets/Scripts/Menu/MenuSelectionHandler.cs
  2. 2
      UOP1_Project/Assets/Scripts/UI/UIMenuManager.cs

10
UOP1_Project/Assets/Scripts/Menu/MenuSelectionHandler.cs


}
}
// Debug
// private void OnGUI()
// {

private void Update()
{
if ((EventSystem.current!=null)&& (currentSelection != null)&&(EventSystem.current.currentSelectedGameObject!=currentSelection) )
{
EventSystem.current.SetSelectedGameObject(currentSelection);
}
}
}

2
UOP1_Project/Assets/Scripts/UI/UIMenuManager.cs


private IEnumerator Start()
{
_inputReader.EnableMenuInput();
yield return new WaitForSeconds(1); //waiting time for all scenes to be loaded
yield return new WaitForSeconds(0.4f); //waiting time for all scenes to be loaded
SetMenuScreen();
}
void SetMenuScreen()

正在加载...
取消
保存