is there any function call will be call after i activate an object ?

i have a script attach to an object, after i deactivate the object the script will stop running too, is there any function will be called in the script after i activate the object again ?

the reason why i’m asking this is because i’m using “yield WaitForSeconds(1)”, if i deactivate the object when it’s still waiting, the script will stop running even if i active the object again.

That’s because the coroutine need to be called again, if it’s not one of unity like Start or Update. The callback for the activation is OnEnable.

I have a doubt though. I’m a little fuzzy between enabled/activate and OnEnable/Start. So if it’s not one, it’s the other !