툴/유니티

Input.GetKey 에러

스튜디오 오버그래픽스 2021. 8. 11. 03:56

유니티 작업하면서 키보드 입력값을 받을때 Input.GetKey를 사용한다.

https://docs.unity3d.com/ScriptReference/Input.GetKey.html

 

Unity - Scripting API: Input.GetKey

GetKey will report the status of the named key. This might be used to confirm a key is used for auto fire. For the list of key identifiers see Input Manager. When dealing with input it is recommended to use Input.GetAxis and Input.GetButton instead since i

docs.unity3d.com

원래도 잘쓰던 기능이었는데 2020버전 넘어오면서 시스템이 바뀌어서 그런가 갑자기 오류가 나옴

 

You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings. UnityEngine.Input.GetKeyDown...이하생략

실행했을때 이런 오류 문구가 뜸.

 

-해결방법-

edit - project settings - player - other settings - configuration - active input handling - Both로 체크