Error that I don't understand

I am doing the first few things in the script and it says this error every time and I don’t know what to do.


Here’s the code:

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

public class Movement : MonoBehaviour

{

// Start is called before the first frame update

void Start()

{

   

}

// Update is called once per frame

void Update()

{

    ProcessInput();

}



void ProcessInput()

{

   if(ProcessInput.GetKey(KeyCode.Space))

   {

       Debug.Log("Thrusting");

   }

}

}

I think you have a typo and mean to use:
if(Input.GetKey(KeyCode.Space))

The other option that comes to mind is unlikely to help in this situation.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms