Question by
Rickler · Apr 08, 2016 at 03:34 PM ·
coroutinesevents
Wait until event fires in coroutine
I have a coroutine that handles the tutorial section of my game. At a certain point, I need it to stop until a button has been pressed. That button already fires an event. The function called by the event is a void myfunc (myObj foo)
type.
Is there a way to listen to such event inside the tutorial coroutine (which is already running)?
If not, is there another way to listen to the button in my coroutine?
Comment
Have the button press set a bool to true and the coroutine repeat until that boolean is true and then do whatever it needs to do after.
Your answer
