Skip to content

Commit

Permalink
moved runner init into Awake
Browse files Browse the repository at this point in the history
  • Loading branch information
McJones committed Jul 15, 2022
1 parent 52f9589 commit 0d39162
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions Runtime/DialogueRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -716,14 +716,7 @@ void Awake()
Debug.Log($"Dialogue Runner has no LineProvider; creating a {nameof(TextLineProvider)}.", this);
}
}
}

/// <summary>
/// Prepares the Dialogue Runner for start.
/// </summary>
/// <remarks>If <see cref="startAutomatically"/> is <see langword="true"/>, the Dialogue Runner will start.</remarks>
private void Start()
{
if (dialogueViews.Length == 0)
{
Debug.LogWarning($"Dialogue Runner doesn't have any dialogue views set up. No lines or options will be visible.");
Expand All @@ -747,11 +740,18 @@ private void Start()

// Load this new Yarn Project.
SetProject(yarnProject);
}
}

if (startAutomatically)
{
StartDialogue(startNode);
}
/// <summary>
/// Prepares the Dialogue Runner for start.
/// </summary>
/// <remarks>If <see cref="startAutomatically"/> is <see langword="true"/>, the Dialogue Runner will start.</remarks>
private void Start()
{
if (yarnProject != null && startAutomatically)
{
StartDialogue(startNode);
}
}

Expand Down

0 comments on commit 0d39162

Please sign in to comment.