- Home /
Question by
softmarshmallow · May 23, 2017 at 06:21 AM ·
coroutineeventwaitforsecondsienumeratorwait
Ienumerator wait for event
I'm making a tutorial system.
This is how it works.
i have a class named
TutorialSegmentData
in
TutorialController
i loopTutorialSegmentData
sin every loop i use
yield return new WaitForSeconds(tutorialSegmentData.waitingTime)
but now what i want to do is waitig until user's action. For example, i add callback to buttonClick event and in every loop, it should wait for user to press that button. (its more complicated than button actually.)
any solutions for this? ps. i would like to avoid using WaitUntil and turning boolean to true when the button is clicked.
Comment