heygleeson/godot-ldtk-importer

Not an issue but more a question (Entities)

Closed this issue · 1 comments

This is most likely better with Github discussions but I was curious what a workflow looks like with entities.

The two avenues I can think of are using the hook for entities to instantiate scenes based on the entity date.
The challenges are... the JSON data is untyped because GODOT arrays are untyped and a bit more of a hassle

The other avenue is using the Placeholder Entities, grab a reference the entity, then at runtime, copy all the fields and then destroy it.
The downside is the overhead of needing to copy and destroy each placeholder.

Currently this is handled is by using Entity Post-Import scripts. Each EntityLayer holds an array of dictionaries for each entity and will run this script. This is where you can use the entity's dictionary to instantiate new scenes and pass on the necessary data.