Skip to content

[v3] Stopping then starting a new node skips a line and breaks #86

@ptlthg

Description

@ptlthg

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:

DialogueRunner.Stop();
DialogueRunner.StartDialogue("New_Node");

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).

Image

I added 5 different buttons that all stop then start a new node in different ways. You can see their implementations in DialogueManager.cs

  1. Bid Normal Stops then Starts with no delay
  2. Bid Deferred Stops then Start is called with CallDeferred
  3. Bid OnComplete Stops then Starts when DialogeRunner.onDialogueComplete is emitted
  4. Bid Next Frame Stops then Start is called after waiting for a process frame
  5. Bid After Timer Stops then Starts after a 3 second timer times out. This is the only one that works

After 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions