Skip to content

Commit afb9ee1

Browse files
committed
Tidy up the Basic unity example.
1 parent ded7965 commit afb9ee1

File tree

4 files changed

+1057
-1222
lines changed

4 files changed

+1057
-1222
lines changed

Unity/Assets/Yarn Spinner/Examples/Demo Scripts/ExampleDialogueUI.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public class ExampleDialogueUI : Yarn.Unity.DialogueUIBehaviour
6666

6767
public RectTransform gameControlsContainer;
6868

69-
void Start ()
69+
void Awake ()
7070
{
7171
// Start by hiding the container, line and option buttons
7272
if (dialogueContainer != null)
@@ -144,10 +144,8 @@ public override IEnumerator RunOptions (Yarn.Options optionsCollection,
144144
SetSelectedOption = optionChooser;
145145

146146
// Wait until the chooser has been used and then removed (see SetOption below)
147-
do {
148-
yield return null;
149-
} while (SetSelectedOption != null);
150-
147+
yield return new WaitUntil(delegate {return SetSelectedOption == null;});
148+
151149
// Hide all the buttons
152150
foreach (var button in optionButtons) {
153151
button.gameObject.SetActive (false);

0 commit comments

Comments
 (0)