Is it possible to set a default variable in array or dictionary when adding a new element.
For example, an array for strings has a default variable of string so when pressing “Add Element”, it creates an element that already has a string.
when you go with @export var arr : Array[String] and click on “Add Element” in your editor’s inspector, it will create a new string that’s empty. It’s not possible to preset a value for new array items.
If you don’t really need the actual value of the String and merely require some preset identifiers, you could go with enums instead
that way, everytime you add a new array element, it will preset “your Default” but it restricts you from choosing any other value that’s not in the enum which is most likely not what you want.