Input.GetButton and GetKey not wotking in Update()

void Update()
if (Input.GetButtonDown(“Fire1”))

				Debug.Log ("SPAAAAACEEEEE");								

Hi @xavioreg

It’s strange as to why that might happening. A couple of issues that might be causing it are the following.

  1. Is the script inheriting from MonoBehaviour?
  2. Has the script been attached to a GameObject?
  3. Is the GameObject currently active in the scene?
  4. Are you using the UnityEngine namespace?
  5. Have you changed the Input name of the button in Unity’s Input Manager?
  6. Have you tried using GetKeyDown rather than GetButton?
  7. Is Unity recognizing your Input device?

I hope one of those offers the solution the problem as I can’t see any other reason as to why it wouldn’t work.