diff --git a/CHANGELOG.md b/CHANGELOG.md index 765279a0..e6747351 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -70,6 +70,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - `AsyncOptionsView` now supports configuring its fade duration. - `MarkupPalette` and the associated `PaletteMarkerProcessor` now support custom TMP rich text tags beyond what the more basic markers allow. - `LineMetadata` now has public API methods for constructing and manually adding elements. +- `DialogueRunner.SetProject` now sets the `Program` of its internal `Dialogue` object. Previously, this didn't happen until `StartDialogue()`. ### Changed diff --git a/Runtime/DialogueRunner.cs b/Runtime/DialogueRunner.cs index f5846540..df096ff0 100644 --- a/Runtime/DialogueRunner.cs +++ b/Runtime/DialogueRunner.cs @@ -833,6 +833,15 @@ public void SetProject(YarnProject project) throw new InvalidOperationException("Can't set project, because dialogue is currently running."); } this.yarnProject = project; + + if (project != null) + { + Dialogue.SetProgram(project.Program); + } + else + { + Dialogue.SetProgram(null); + } } ///