Closed staneta closed 7 months ago
Hi! Yes, the assumption that TryGetValue
will only be called with bool
, float
and string
is not quite accurate.
While it's true that bools, floats and strings are the only types in Yarn Spinner, the Dialogue calls TryGetValue
with IConvertible
type parameter whenever it needs to fetch a variable's contents. This is because the Dialogue doesn't know or care what type the variable will be, and IConvertible
is the common denominator.
What is the current behavior?
I have a custom VariableStorage. ContinueDialogue calls the function
TryGetValue<T>(string variableName, out T result)
with type IConvertible. This never happened in 2.3.Please provide the steps to reproduce, and if possible a minimal demo of the problem:
Setup a dialogue and play it to the end? Here's an example node that has this behaviour (all of my nodes have this behaviour):
What is the expected behavior?
I think TryGetValue should only be called with types: string, float, bool? Let me know if that's an incorrect assumption.
Please tell us about your environment:
Other information
I printed out a variable name and type in TryGetValue and here's the stacktrace:
I'm also attaching my EasySave3 custom variable storage if it's of any value: EasySave3Storage.txt