So I’m a complete noob when it comes to unity and c# ( I only started playing with it about 2 months ago) I’m currently creating an endless runner that when you collide with an obstacle the player can rewind time by hold spacebar.
All these things work fine but while the rewinding time works the spawn point continues to spawn new enemies.
After watching a few tutorials and trying to do it myself I’m here to see if anyone can help.
I’m tried creating
Public GameObject Spawn;
Attached the spawn point object with the script attached.
And trying to call it on
If (Input.GetKeyDown(Keycode.space))
Spawn.GetComponant().enabled = false;
And
And the reverse when space is released.
But I can’t seem to get it to work, I would very appropriate of anyone who could offer some help.
Thanks.