diff --git a/Runtime/DialogueRunner.cs b/Runtime/DialogueRunner.cs
index 78872a8a..cddb5e6b 100644
--- a/Runtime/DialogueRunner.cs
+++ b/Runtime/DialogueRunner.cs
@@ -599,6 +599,27 @@ async YarnTask WaitForOptionsView(AsyncDialogueViewBase? view) {
}
}
+ ///
+ /// Sets the dialogue runner's Yarn Project.
+ ///
+ ///
+ /// If the dialogue runner is currently running (that is, is ), an is thrown.
+ ///
+ /// The new to be
+ /// used.
+ /// Thrown when attempting
+ /// to set a new project while a dialogue is currently
+ /// running.
+ public void SetProject(YarnProject project) {
+ if (this.IsDialogueRunning) {
+ // Can't change project if we're already running.
+ throw new InvalidOperationException("Can't set project, because dialogue is currently running.");
+ }
+ this.yarnProject = project;
+ }
+
public void StartDialogue(string nodeName)
{
if (yarnProject == null) {