Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chunks should inherit layer field from layer object. #161

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fmoo
Copy link
Contributor

@fmoo fmoo commented Nov 4, 2020

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

@fmoo
Copy link
Contributor Author

fmoo commented Nov 4, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] When the map is set to infinite, the layer custom property is not set to children.
1 participant