-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v3 beta] Stopping then starting a new node skips a line and breaks #86
Comments
Also want to add that I don't need stopping then starting instantly to work, but at least the stopping then starting when |
Thank you for the reproduction project. I'll try to fix this as soon as I can. I'm hesitant to make Stop() be async as I like to keep the API as similar to the Unity plugin as possible, but it might make sense to emit the onDialogueComplete signal after the views have finished their async cleanup. |
Stop doesn't need to be async, was just throwing that out there. A |
I got the project set up to debug. I don't know the cause so far but I can definitely confirm the bug. What I'm seeing is that RunLineAsync is immediately called twice when the bug happens But while the second RunLineAsync is running, the first is still running, as I then hit the breakpoint for the first line toward the bottom of RunLineAsync. So the two are running simultaneously, and I think the key will be figuring out why the second RunLineAsync triggers before the first line is done. I'll continue looking |
Yep, that was the behavior I was seeing. I had trouble tracing the bug within this plugins code at all, so it might be a bug in the YarnSpinner library itself? Worth trying that out if you have the ability to test in Unity or something. |
I would have to install Unity, but I might if further investigation leads me to think it might be a problem with the base library |
At the moment I'm awaiting an example of a fix upstream in the Unity plugin |
Discussed in Discord starting here: https://discord.com/channels/754171172693868585/1154619415665574009/1343420213982400573
In my game, I often interrupt running dialogue and then immediately start a new node. This worked fine in v2 without any delays between the calls, just like this:
After updating and using the AsyncLineView, this code now stops the running dialogue, then starts the new node, skips the first line instantly, and only displays about half of the second line in the new node before the typewriter breaks (disabling the typewriter fixes only that part of the problem).
I've made a reproduction project here: StartStopBugRepro.zip
You can also open this in 4.3 stable to observe the same bug (you might have to reassign the main scene).
I added 5 different buttons that all stop then start a new node in different ways. You can see their implementations in
DialogueManager.cs
CallDeferred
DialogeRunner.onDialogueComplete
is emittedAfter clicking any of these buttons you should see
Bidder: I'll bid! I'll bid!
. But you usually see the line after that. Sometimes spamming the buttons can made the correct line show up.2025-02-24.21-19-04.mp4
The text was updated successfully, but these errors were encountered: