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

AddCommandHandler<string[]> doesn't register command with arbitrary number of parameters #260

Open
dario-zubovic opened this issue Dec 7, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@dario-zubovic
Copy link

What is the current behavior?
If method is registered with AddCommandHandler<string[]> instead of [YarnCommand], it's not registered correctly and throws error at play time:
image

What is the expected behavior?
It's expected that AddCommandHandler method behaves the same as YarnCommand attribute and register command that takes arbitrary number of parameters.

Please tell us about your environment:

  • Yarn Spinner Version: 2.4.0
  • Unity Version: 2022.3.10f1

Other information

Can't call command (X): incorrect number of parameters
UnityEngine.Debug:LogError (object)
Yarn.Unity.DialogueRunner:HandleCommand (Yarn.Command) (at ./Library/PackageCache/[email protected]/Runtime/DialogueRunner.cs:903)
Yarn.VirtualMachine:RunInstruction (Yarn.Instruction)
Yarn.VirtualMachine:Continue ()
Yarn.Dialogue:Continue ()
Yarn.Unity.DialogueRunner:ContinueDialogue (bool) (at ./Library/PackageCache/[email protected]/Runtime/DialogueRunner.cs:1142)
Yarn.Unity.DialogueRunner:SelectedOption (int) (at ./Library/PackageCache/[email protected]/Runtime/DialogueRunner.cs:1083)
Yarn.Unity.OptionsListView/<<RunOptions>g__OptionViewWasSelectedInternal|15_2>d:MoveNext () (at ./Library/PackageCache/[email protected]/Runtime/Views/OptionsListView.cs:176)
UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)
@dario-zubovic dario-zubovic added the bug Something isn't working label Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant