A method to cleanly cancel an in-progress DialogueRunner. e.g. DialogRunner.cancelDialogue
.
The cancelDialogue
method should still trigger the proper DialogueView methods. For example onNodeComplete
and onDialogueComplete
- or - a new method could be introduced to DialogueView called onDialogueCancel
. Cancelling should also still complete the future returned by startDialogue
.
Thoughts on approach?
Suddenly cancelling a dialogue outside of normal flow might be necessary, for example, if the user exits to menu. It could also happen if there are NPC dialogues happening that need to be cancelled when the player leaves the scene. There are many other cases, too.
It doesn't seem possible to do this currently, unless I just haven't found it yet? According to the comments, the method called jumpToNode
apparently would do this if called with a null
node. However, this is an internal method and not accessible outside of the runner.
Since this would be a new method, the risks are lower. The risks are that the user would need to account for an abrupt cancel in the code and could not rely on the standard dialog flow always completing. For example, there could be a risk that onLineStart
is immediately followed with onDialogueCancel
, and the developer would need to account for it.
I would be interested in contributing this improvement, but I would like guidance from the original developer(s) on the best way to approach this.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too