I’m trying to create a script that will allow me to delay the active state of a GameObject on a button press. I have a short (3 second) animation I’d like to have play before a GameObject appears after I’ve pressed my button. I have the animation linked to the button already but cannot figure out how to set a delay on the GameObject. Any help would be much appreciated.
You can add an animation event to the end of your animation so that it turns your game object on. That way if you change the animation length, the time will adjust appropriately as long as you move the event.
If you just want to delay, make a coroutine that yields for three seconds, then does the game object activation you want. Tons of tutorials on making coroutines out there.