78b98723bc816cf039ebd0e51487203976f0ddcc74da65776cb39a98bfb7924a3d685fe25badada1deb2af7eb876ad



상황 ; 



오브젝트에는

Player Input,

InputManager 

public class InputManager : MonoBehaviour

{


    public static Action<Vector2> moveEvent;

    public static Action<bool> attackEvent;

    public static Action<int> selectWeaponEvent;


    public static InputManager inst.ance;

    private void Awake()

    {

        if(innstance == null)

        {

            instnance = this;

        }

        else

        {

            Destroy(gameObject);

        }

        DontDestroyOnLoad(insnbtance);

    }


    ....

}


이렇게 이벤트를 발행하는 싱글톤 컴포넌트를 붙여놓은 상태



78e89e36ebd518986abce8954482776c04

현재 플레이어 인풋, Invoke Unity Events에 저 Event들을 Invoke하는 메소드를 달아놓음


문제는 키 바인딩 변경을 위해 이 오브젝트를 메인 메뉴로 옮겨서 돈디스트로이로 박아놨는데


메인메뉴로 두번 이상 돌아갈때마다 


Cannot find matching control scheme for InputManager (all control schemes are already paired to matching devices)

UnityEngine.InputSystem.PlayerInput:OnEnable () (at ./Library/PackageCache/com.unity.inputsystem@7fe8299111a7/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1828)


이런 오류가 나옴, 그럼에도 불구하고 작동은 함

아마 플레이어인풋이 키를 선점하고 나중에 들어온 플레이어 인풋이 삭제되기 전에 실행한 메소드가 해당 경고를 발행하는거 같음

작동은 해서 상관 없는데 Player Input에 대한 이해가 별로 없는 상태라 좀 무서움

부트스트랩 씬 만들어서 인게임에서 제외시키는 식으로 해결할수는 있는데 근본적인 해결같은 느낌은 아닌거같음

다른 방법 있는지 궁금함..



59


오늘 키바인딩이 사람 열불터지게만드는구나 아주