YarnSpinnerTool / YarnSpinner-Unity

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

Disabling domain reload makes Yarn projects compile incorrectly #221

Closed chocola-mint closed 1 year ago

chocola-mint commented 1 year ago

What is the current behavior?

When Domain Reload is disabled, changes to Yarn scripts aren't correctly compiled in Play Mode.

Please provide the steps to reproduce, and if possible a minimal demo of the problem:

  1. Set up the Quick Start demo scene given in the documentation.
  2. Disable domain reload. (Edit -> Project Settings -> Editor -> Enter Play Mode Settings)
    • Keep scene reload enabled.
  3. Enter play mode once, then return. The dialogue should be correct here.
  4. Add new lines to the HelloYarn script.
  5. Enter play mode again, and observe that the new lines aren't showing up. Exit play mode.
  6. Try reimporting both the HelloYarn script and the YarnProject, and retry 5. You should see that new lines are still not showing up.
  7. Enable domain reload, enter play mode again, and observe that the new lines are showing up again.

What is the expected behavior?

Yarn projects should be correctly compiled in play mode, even without domain reload enabled.

Please tell us about your environment:

Other information

It seems that Yarn projects are compiled AOT. If it's not possible to recompile a Yarn project automatically, it'd be nice to have a manual button that lets us do a clean recompilation, perhaps in the YarnProject inspector or the DialogueRunner inspector.

samanabo commented 1 year ago

I'm also seeing this issue in v2.3.0-beta1. It is especially noticeable when using the DialogueReference type. The list of available nodes is not updated until you disable fast enter play mode, and then press play to recompile.

aecanales commented 1 year ago

Would also love to have a manual button or something similar. I understand the issue myself so I keep it in mind while working but designers/writers in the team keep tripping with this.

Bryan-Legend commented 1 year ago

Would also love to have a manual button or something similar. I understand the issue myself so I keep it in mind while working but designers/writers in the team keep tripping with this.

I also want a recompile button. Gimme control.

chocola-mint commented 1 year ago

I've verified on version 2021.3.27f1 that with #232 this issue has been fixed as well, so I'll be closing it for now.