Skip to content

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

Closed
SirHall wants to merge 3 commits into
StarArawn:mainfrom
SirHall:fast_fill
Closed

Invert fill_tilemap usage of add_child to the tilemap parent entity to instead use add_children#377
SirHall wants to merge 3 commits into
StarArawn:mainfrom
SirHall:fast_fill

Conversation

@SirHall
Copy link
Copy Markdown

@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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