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

SetInitialVariables improvements #15

Open
alexjhetherington opened this issue Sep 24, 2023 · 2 comments
Open

SetInitialVariables improvements #15

alexjhetherington opened this issue Sep 24, 2023 · 2 comments

Comments

@alexjhetherington
Copy link

Method SetInitialVariables in class DialogueRunner

  1. This method is currently uncalled; I propose that it should be called when a story is started inside DialogueRunner, which solves the issue of autostarted stories missing variables
  2. It could be refactored to use method SetAllVariables on VariableStorageBehaviour, which is helpful if a custom variable storage object fires events when variables are set
@dogboydog
Copy link
Collaborator

Hey, thanks for the issue. Looking at the Unity implementation which this repo is based on, I don't think this is used there either. Seems to be a utility provided for users to manually reset values to initial variables as far as I can tell.

I haven't seen the issue with auto started stories missing variables, could you make an issue describing that? Seems that the root of the request here is fixing that, which might just be a bug with another cause.

@dogboydog
Copy link
Collaborator

dogboydog commented Sep 24, 2023

I just added an example usage of 'start automatically' in #16, where Intro.yarn seems to use the default value of the string variable correctly. But if you can give a reproduction of the scenario you're seeing where variables aren't initialized, I can take a look. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants