snozbot / fungus

An easy to use Unity 3D library for creating illustrated Interactive Fiction games and more.
MIT License
1.6k stars 291 forks source link

Writer.Paused auto complete the rest of texts when resumed #936

Open breadnone opened 3 years ago

breadnone commented 3 years ago

Describe the bug Ideally, after pausing in the middle of the sentence, when resumed, it should continue to where it was left of

To Reproduce Trigger the pause with this: GetComponent().Paused = true;

then change it's bool to "false" to resume. It can be triggered with Invoke as well

Then describe the steps to reproduce the behavior:-->

  1. Get the component, set the writer to Paused = true
  2. Then resume the writer by setting the bool to false

Expected behavior As the "Paused" name implies, it should resume the rest of the sentence/texts with the same type writer effect

Screenshots The bug can be seen in the video below

https://user-images.githubusercontent.com/64100867/103435124-1d1ba880-4c3d-11eb-89f0-6b4230c813a4.mp4

Versions & Platform (please complete the following information):

breadnone commented 3 years ago

This Pause feature has a ton possible use cases. For example, one can make a Skits (Mini conversation on top of main conversation, like in JRPG) while keeping in check the main conversation/flow.

I've noticed users on forum & discord that they used to disable the DialogInput for pause, which I don't think should not be used in terms of pausing the game as it served a different purposes

stevehalliwell commented 3 years ago

Having looked over the existing usage of this property, it only exists for use by external code, that Fungus doesn't control. Needs a refactor and tests added.

breadnone commented 3 years ago

At some point I managed to fix this issue a while ago, the thing is it's more of a workaround and quite ugly :)