YarnSpinnerTool / YarnSpinner-Unity

The official Unity integration for Yarn Spinner, the friendly dialogue tool.
MIT License
491 stars 85 forks source link

DialogueRunner indicating whether line or option is active #261

Closed nrvllrgrs closed 7 months ago

nrvllrgrs commented 8 months ago

Is your feature request related to a problem? Please describe. I would like to know when a DialogueRunner is showing a line or a set of options.

Describe the solution you'd like I would like DialogueRunner to include a isOptionRunning property indicating when the running dialogue is displaying options.

Describe alternatives you've considered I've considered writing a custom DialogueView that reports this information. However, this becomes a lot of potential overhead for a boolean. It may be useful to also include onLine and/or onOptions events.

Additional context N/A

McJones commented 7 months ago

In the past we used to have more events like OnLine and OnOptions but these became a source of frustration and spaghetti code, so we got rid of them. Nowadays like you said a custom DialogueView is the way to go, as we have found the number of times where you need to know dialogue relevant events and you are not also needing to manage and present that data is basically never. Hence why custom DialogueViews are the approach we recommend.