Add custom tile properties to Godot .tscn export format by keharriso · Pull Request #3653 · mapeditor/tiled (original) (raw)

Allows code like: get_custom_data("Properties").get(<Property>)

Just wondering, but this double call seems a bit superfluous. Could we also make get_custom_data(<Property>) work? Or would it be undesirable to add a layer for each property?

I had a look at Godot and I think the way this should work is to set up a Custom Data Layer for each individual property, rather than exporting all properties as a Variant. This allows nicely visualizing each property's value for all tiles in a tileset, for example a custom "Depth" float property on the tiles:

image

It is a little strange that the layer name doesn't show up here though, and instead it shows the layer ID:

image

But that looks to me like something that might eventually be improved in the Godot UI and not a reason to export the properties as nested in a Variant.