Hi Everyone!
I’m having a little trouble
Using PlayMaker I'm invoking method which calls a coroutine when I hit a button. Once the coroutine is called a timer appears and counts down.
Now My question is; when I run the method and save the game if the timer is still running it when I load back up it doesn’t save the state and just ends the coroutine. Is it possible to continue where the coroutine left off and have the timer keep on going when the game is loaded back up?
The same thing happens when I try run the method through an OnClick() without playmaker. I'm so lost
Thanks!
Need help with continuing method..
Re: Need help with continuing method..
Hi there,
It wouldn't be possible to save the state of a coroutine because it's not serialisable at runtime. Instead you would need to save the elapsed time of the timer and then use this to restart the coroutine at that specific time.
All the best,
Joel
It wouldn't be possible to save the state of a coroutine because it's not serialisable at runtime. Instead you would need to save the elapsed time of the timer and then use this to restart the coroutine at that specific time.
All the best,
Joel
Re: Need help with continuing method..
Hi Joel,
Oh! Thank you!! Appreciate the help!
Oh! Thank you!! Appreciate the help!