Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot export Dictionary in 3.0 #16247

Closed
willnationsdev opened this issue Jan 31, 2018 · 5 comments
Closed

Cannot export Dictionary in 3.0 #16247

willnationsdev opened this issue Jan 31, 2018 · 5 comments

Comments

@willnationsdev
Copy link
Contributor

Godot version:
Godot 3.0 20a52aa

Issue description:
According to this and this, the new debugger PR was supposed to add Inspector editing for exported Dictionary variables, but I can't seem to make this work.

Steps to reproduce:

  1. Create any scene. Add a root node. Add a built-in script:

    export(Dictionary) var dict = {}

  2. Examine the node in the scene. Click the right-arrow next to the Dictionary property. The DictionaryPropertyEdit won't have anything but a Reference section with the Script variable.

export_dict

export_dict_inspector1

export_dict_inspector2

@net8floz
Copy link

I'd also like to know what's going on with this.

@ghost
Copy link

ghost commented Feb 19, 2018

DictionaryPropertyEdit can only change value. The key is read-only. (for now)

void DictionaryPropertyEdit::_set_key(const Variant &p_old_key, const Variant &p_new_key) {
// TODO: Set key of a dictionary is not allowd yet
return;
}

It is supposed to work if you export Dictionary with some values, but there's another bug. Exported dictionaries are saved in the scene file as null.

Node.tscn:

dict = null

@torohaifisch
Copy link

any news on a fix for this issue?

@bojidar-bg
Copy link
Contributor

It should be now fixed with the new inspector (though it is slightly crashy, but still works).

It is supposed to work if you export Dictionary with some values, but there's another bug. Exported dictionaries are saved in the scene file as null.

To be fixed by #19635 (the GDScript part of the changes).

@akien-mga
Copy link
Member

That's fixed in the master branch.

@akien-mga akien-mga added this to the 3.1 milestone Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants