I’m following along with some online tutorials, and this section of code keeps returning an error in the compiler, and I’m not sure how to solve it, any ideas? Thank you
The Error:
Assets\Scripts\UserInput.cs(7,31): error CS0118: ‘UnityEngine.InputSystem.Controls’ is a namespace but is used like a type
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UserInput : MonoBehaviour
{
public Controls controls;
public static UserInput instance;
private void Awake()
{
if (instance == null)
{
instance = this;
}
controls = new Controls();
}
private void OnEnable()
{
Controls.Enable();
}
private void OnDisable()
{
Controls.Disable();
}
}