How do i edit dictionary for instances of a scene?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By lincolnpepper

Hey there! I have a scene that i want to instance a lot that has 2 exported dictionaries. Unfortunately, the godot UI doesn’t seem to support dictionary editing. If i add keys to the dictionary i can edit the values but i am unable to add or delete keys, which doesn’t make sense since dictionaries are dynamic. Any better way to edit the dictionary across instances? Thanks in advance. Here are some pictures to illustrate what i mean:

:bust_in_silhouette: Reply From: fpicoral

Which Godot are you using? I’m using Godot 3.1 Beta3 and it looks like this:

Code for the example

extends Node

export(Dictionary) var dic = {}

func _ready():
	for key in dic.keys():
		print(key + " value is: " + str(dic[key]))

Node Inspector

enter image description here

Output
enter image description here

I’m using the steam version which does not have version 3.1 since it is still in beta, and unfortunately they have not used the betas steam feature to allow people to use it. Specifically, i am using godot 3.0.6.

lincolnpepper | 2019-02-13 04:38

You will have to wait for the official 3.1 release that has no official date or download from the engine website the last build of the 3.1 version. It’s very stable, I’m using it for a few weeks (since Beta1) and did not have any problems related to the engine.
If you download the 3.1 version, remember to make a backup of your project before opening it with tue 3.1 engine because if you do so, you won’t be able to open the same project on lower versions.
If this answer helped you, please select it as best answer to set this problem as solved. If you have more doubts, please ask!

fpicoral | 2019-02-13 05:15

I didn’t want to use godot 3.1 until it was released because i’m working on a game that we plan to release and i didn’t want to use an unstable build for that. I’ll try godot 3.1 though and if it works well for me i’ll put this as best answer.

lincolnpepper | 2019-02-14 14:24