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

Invert fill_tilemap usage of add_child to the tilemap parent entity to instead use add_children #377

Closed
wants to merge 3 commits into from

Conversation

SirHall
Copy link

@SirHall SirHall commented Dec 29, 2022

Please refer to and read through #375, decline this pull request if this is the wrong path.

Copy link
Collaborator

@bzm3r bzm3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me overall, but I you're right that we don't need to be adding the tiles as children of the tilemap in the first place. So maybe that will be the ultimate simplification?

@StarArawn
Copy link
Owner

This makes sense to me overall, but I you're right that we don't need to be adding the tiles as children of the tilemap in the first place. So maybe that will be the ultimate simplification?

I'm a little late to the party here, but we need to add tiles as children to the tilemap in order for despawn_recursive to work correctly or remind users that they need to despawn tiles. Otherwise this kind of thing can happen:
#384
Where you have dangling tiles(tiles no longer associated with a tilemap). This results in a panic in bevy_ecs_tilemap right now.

@SirHall
Copy link
Author

SirHall commented Jan 21, 2023

Would you rather have all the fill methods add the tiles as children then?

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.

3 participants