SuperTiled2Unity
SuperTiled2Unity copied to clipboard
Chunks should inherit layer field from layer object.
Fixes #160. Verified with @Snowdrama on the Tiled discord in #general.
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.