Hey all, I have an object that is spawned and needs to check if a button is currently being pressed, but it doesn’t seem to be working.
Here is the simple code I have:
void Update()
{
if (Input.GetButtonDown("Rewind"))
{
StartRewind();
}
if (Input.GetButtonUp("Rewind"))
{
StopRewind();
}
if (Input.GetButtonDown("Pause"))
{
StartPause();
}
if (Input.GetButtonUp("Pause"))
{
StopPause();
}
}
However, if I have the “Pause” button held and then spawn the object, it doesn’t seem to check for the button being held down. Any ideas?