Answers for "why doesn't my new unity input system assign input"

2

unity input system not working

//add this somewhere in your script
//PlayerControls is the Input action script

PlayerControls controls;

private void Awake()
{
	controls = new PlayerControls();
}

private void OnEnable()
{
	if (usingController)
	{
		controls.Gameplay.Enable();
	}
}

private void OnDisable()
{
	if (usingController)
	{
		controls.Gameplay.Disable();
	}
}
Posted by: Guest on March-17-2021
-2

unity new input system why cant i make a reference

private Controls inputs;

	void Start{
		inputs = new Controls();
    }
Posted by: Guest on August-24-2021

Code answers related to "why doesn't my new unity input system assign input"

Browse Popular Code Answers by Language