79230212

Date: 2024-11-27 12:15:25
Score: 1
Natty:
Report link

CS0120 error means that you need an instance for a non-static member.

You created this instance on the line: controls = new Controls()

now use this instance like this:

    private void OnEnable()
    {
        controls.Enable(); // changed to lower-case controls
    }

    private static void OnDisable()
    {
        controls.Disable(); // changed to lower-case controls
    }

https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/cs0120

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Phillip Zoghbi