vnen / godot-tiled-importer

Plugin for Godot Engine to import Tiled Map Editor tilemaps and tilesets
MIT License
835 stars 87 forks source link

Reference objects as NodePath rather than Tiled id #159

Open bitbrain opened 2 years ago

bitbrain commented 2 years ago

Compatible with Tiled Version: 1.9.0

Description

Within Tiled, objects can be referenced like so:

tiled

However, within Godot the meta field shows up as Tiled integer id. This pull request changes this behaviour to instead populate the node path of the referenced object for easier lookup.

bitbrain commented 2 years ago

One thing I noticed with this is that it is not recursive - when referencing paths on custom attributes through custom classes, e.g.: Capture

However, I cannot implement that before https://github.com/vnen/godot-tiled-importer/pull/158 is ready, as currently reading these attributes is impossible.