Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Alexandr |
How to add something to an existing dictionary?
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Alexandr |
How to add something to an existing dictionary?
Reply From: | kidscancode |
var some_dict = {"a": 1, "b": 2}
You can add another key like so:
some_dict["c"] = 3
This is all explained in the GDScript “Dictionary” documentation