Skip to content

Commit

Permalink
Lineview now cancels any in-flight lines when dialogue is stopped.
Browse files Browse the repository at this point in the history
Previously when you had auto-advance lines set and then stopped all dialogue the coroutine that would auto-advance was still running.
Now the coroutines are aborted before wrapping up the line, preventing this.
Fixes #262
  • Loading branch information
McJones committed Jan 19, 2024
1 parent eb5e40c commit 010611a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- this is now handled at the codegen side so we can better log it
- `ActionsGenerator` will now generate C# warnings for non-private methods that are attributed as `YarnFunction` or `YarnCommand`.
- `ActionsGenerator` still logs to a temporary location, but now into a `dev.yarnspinner.logs` folder inside the temporary location.
- Auto-advancing `LineView`s will no longer attempt to advance dialogue that has been stopped.

### Removed

Expand Down
1 change: 1 addition & 0 deletions Runtime/Views/LineView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,7 @@ public override void DialogueComplete()
if (currentLine != null)
{
currentLine = null;
StopAllCoroutines();
StartCoroutine(DismissLineInternal(null));
}
}
Expand Down

0 comments on commit 010611a

Please sign in to comment.