I'm trying to retrieve an AoT Dictionary so that I can use it in a script, following the instructions in the API documentation. However, I get this error:
InvalidCastException: Cannot cast from source type to destination type.
This is the method I'm calling:
dictionary = (Dictionary<string, bool>)Variables.Application.Get("progress");
Where the variable dictionary exists in the scope of the entire script as:
public Dictionary<string, bool> dictionary;
I think I'm casting it correctly, but I've never tried to do it with a dictionary before. Am I missing something or is there something about the AoT Dictionaries that prevents this?
What I'm trying to do is use application variables to store a whole bunch of progress-tracking dictionaries during runtime, for ease of access from all my Bolt macros. Then I could fetch and serialize those to a save file whenever I need to save, and vice-versa.
That being said, I'm stuck if I can't access the AoT dictionaries from a script. There are way, way too many entries in the dictionaries to store them as individual variables.
Customer support service by UserEcho