Migration to bevy_ecs_tiled v0.10
This guide outlines the steps required to migrate your project to version 0.10 of bevy_ecs_tiled.
Main Changes
-
Bevy v0.17 Support:
bevy_ecs_tilednow works seamlessly with Bevy v0.17, allowing you to take advantage of the latest engine features and performance improvements. See the Bevy 0.17 release notes for details. -
Enhanced ColliderCreated Event: The
ColliderCreatedevent now includes a direct reference to the collider's parent entity, making it easier to attach additional physics components or interact with spawned colliders. The event previously only contained aTiledColliderOrigin, which has been renamed toTiledColliderSource. -
External Type Re-exports: Types from external crates (such as
rs-tiled,geo, andregex) are now re-exported through dedicated modules. This avoids name clashes and makes type usage explicit.
Migration Steps
-
Update Dependencies in
Cargo.toml:bevy = "0.17" bevy_ecs_tiled = "0.10"Note: You may also need to update other Bevy-related crates to ensure compatibility.
-
Review the Bevy Migration Guide: Follow Bevy's official migration steps to update your project for Bevy v0.17. This will help you resolve breaking changes and take advantage of new features.
-
Update Usage of External Types:
If your code uses types from
rs-tiled,geo, orregex, you must now reference them via their dedicated modules. This ensures clarity and prevents naming conflicts.#![allow(unused)] fn main() { use bevy_ecs_tiled::prelude::*; // For external types, use their module: let tiled_id: tiled::TiledId = 10; } -
Update Usage of
TiledEvent<ColliderCreated>:In previous versions, the event only provided a
TiledColliderOrigin. In v0.10, this has been renamed toTiledColliderSource, and the event now also includes a reference to the collider's parent entity. This change makes it easier to interact with colliders and attach additional physics components directly after creation.