A-Dyu의 개발 일기장
[유니티] 뉴 인풋 사용 시,InvalidOperationException 오류 본문
유니티에서 old input을 사용하다가 new input system으로 바꾸자, 이런 오류가 일어났다.
InvalidOperationException: 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.
해결 방법은 간단하다. Edit에서 Project Setting창을 열고
Player > Other Setting을 클릭하면 이런 창이 나온다
많은 설정들이 있는데 우리는 Configuration 카테고리에 들어가 Active Input Handling.을 찾으면 된다.
아마 Input Manager (Old)로 되어있을 텐데, new Input Pakage (New)나 위 사진처럼 Both로 바꾸면 된다.
new Input Pakage (New)는 뉴인풋만 사용한단 뜻이고, Both는 두 가지를 혼합해 사용한단 뜻이다.
중간에 Input Manager 를 사용하다 바꾸는 경우라면, 일단 Both로 설정한 후 차차 바꾸어나가는 걸 추천한다.