I need to modify an object’s sprite, and after 2s, destroy him and instantiate other object in the same position. But I’m finding trouble when trying to implement a timer in my code. Can someone help?
Multiple ways. I’d opt for a coroutine for their simplicity.
1 Like
This… I do this so much I have a class that does it for me:
I use my CallAfterDelay class for delayed action.
https://gist.github.com/kurtdekker/0da9a9721c15bd3af1d2ced0a367e24e
See usage notes at bottom below gist code.