判斷鼠標或手指是否點擊在UI界面上
EventSystem.current.IsPointerOverGameObject()
//檢查是否在UI元素上單擊了鼠標
如果(EventSystem.current.IsPointerOverGameObject())
{
Debug.Log(“在UI上單擊”);
}
判斷鼠標或手指是否點擊在UI界面上
EventSystem.current.IsPointerOverGameObject()
//檢查是否在UI元素上單擊了鼠標
如果(EventSystem.current.IsPointerOverGameObject())
{
Debug.Log(“在UI上單擊”);
}
值 對應鍵 Backspace 退格鍵 Delete Delete鍵 Tab TabTab鍵 Clear Clear鍵 Return 回車鍵 Pause 暫停鍵 Escap