SuperTiled2Unity icon indicating copy to clipboard operation
SuperTiled2Unity copied to clipboard

Chunks should inherit layer field from layer object.

Open fmoo opened this issue 5 years ago • 1 comments

Fixes #160. Verified with @Snowdrama on the Tiled discord in #general.

fmoo avatar Nov 04 '20 07:11 fmoo

More details:

When using an "infinite" map, the map is split into "Chunk" objects, and while there is some logic to copy the layer from the parent via AddSuperCustomProperties(), the chunk subobjects do not get added through this path, so when the actual collider children are copied on, they inherit the default layer.

This diff fixes this buy explicitly copying the .layer from the Tiled layer gameObject onto the chunk gameObject, before creating the collision layers, so that things get inherited correctly.

fmoo avatar Nov 04 '20 08:11 fmoo