Skip to content

What's the best way to clean/despawn everything? #218

Answered by Trouv
stephenjjbrown asked this question in Q&A
Discussion options

You must be logged in to vote

textures start to break and I get other strange behavior.

This sounds like a bug that's in bevy_ecs_tilemap 0.11. You may have better luck here with this patch:

[patch.crates-io]
bevy_ecs_tilemap = { git = "http://github.com/StarArawn/bevy_ecs_tilemap", version = "0.11", branch = "main" }

As for the best way to despawn everything, it depends on whether or not you want to keep the LdtkWorldBundle you've already spawned around. If you don't then what you're doing is probably fine. If you want to keep it around (in case you're not storing the Handle<LdtkAsset> anywhere else), it may suffice to empty the LevelSet collection instead, but it might get automatically re-populated if you have a L…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@stephenjjbrown
Comment options

Answer selected by stephenjjbrown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants