You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Load the Tiled map using the level file name
let map_handle: Handle<tiled::TiledMap> = asset_server.load(level_file_name.0.clone());
// Spawn the Tiled map bundle
commands.entity(entity).insert(tiled::TiledMapBundle {
tiled_map: map_handle,
..Default::default()
});
When I despawn the original entity (also with despawn_recursive()) the map doesn't get removed with it
The text was updated successfully, but these errors were encountered:
You'll need to iterate through the entities in TileStorage and despawn them manually.
Some of the examples in this repo add spawned TileBundles as children of the Tilemap, which is also an option if you want to use despawn_recursive, but I personally don't think it's a good idea. But automatic despawning of tiles is something I'd personally like to see done. (See #582)
Hi, I'm using the Tiled example
When I despawn the original entity (also with
despawn_recursive()
) the map doesn't get removed with itThe text was updated successfully, but these errors were encountered: