Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dialogue Stops Running When Jumping to Current Node While Using Audio Line Provider #390

Open
amesterSim opened this issue Sep 30, 2024 · 0 comments
Labels

Comments

@amesterSim
Copy link

What is the current behavior?

When making a simple yarn script with voice-over that has a node that jumps to itself, we experience a:

ArgumentExpection: An item with the same key has already been added.

error inside of the AudioLineProvider at line 231.

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

  1. Create a simple yarn script with a single node.
  2. Inside of this starting node, include a single line of dialogue with a single option response that leads to a jump command to the starting node.
  3. Pull into a fresh scene the default DialogueRunner prefab.
  4. Hook up an AudioLineProvider to the DialogueRunner.
  5. Generate a yarn project for this script.
  6. Set up simple addressables/localization for this yarn project.
  7. Set up some audio to be associate with the single line of dialogue in our script, ensuring that it loads appropriately.
  8. Run the script, observing the console and halting of the yarn script.

What is the expected behavior?

The Audio Line Provider should be able to account for loading into the current node. This can be done through either ignoring a duplicate key or full clearing the dictionary before loading a future node's assets.

Please tell us about your environment:

  • Yarn Spinner Version: 2.4.2
  • Unity Version: 2022.3.47

Other information

I have implemented a simple fix for my version that ignores a complete load if the loaded content already exists, but the more appropriate solution would be to remove the duplicate load task before it is performed to save on runtime.

You will want to look at the PrepareForLines function inside of the AudioLineProvider to implement this fix.

@amesterSim amesterSim added the bug label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant