I am a noob working on a project, and all of a sudden code that would repeat (say clicking on an object) has stopped repeating and only works once. In an effort to rule things out, I finally created a simple project with a cube game object and attached the following code.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Q : MonoBehaviour
{
void Start()
{
}
void Update()
{
if (Input.GetKeyDown(KeyCode.Q))
{
Debug.Log("q has been clicked");
}
}
}
This will only perform once; if I press the key more times, there is no more log read out.
Maybe this is the expected result. Maybe I am imagining the whole thing. I have also tried updating unity editor in case I have broken it, but the same thing happens with the latest release.
Any pointers would be gratefully received.