-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: add migration guide from v0.4.0
- Loading branch information
1 parent
ae6af39
commit c8ed403
Showing
5 changed files
with
62 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# From v0.4.X to v0.5.X | ||
|
||
## Overview | ||
|
||
Version 0.5 updates the crate for Bevy v0.15. | ||
|
||
It also takes advantages of the new `required_component` feature to simplify the crate API. | ||
|
||
## Bevy v0.15 update | ||
|
||
[Bevy official migration guide](https://bevyengine.org/learn/migration-guides/0-14-to-0-15/) | ||
|
||
## Misc changes | ||
|
||
### `TiledMapSettings` update | ||
|
||
`map_initial_transform` and `map_initial_visibility` have been removed from `TiledMapSettings`. | ||
|
||
If you want to tweak your map positioning or visibility, you should instead directly insert corresponding `Transform` or `Visibility` components on it. | ||
|
||
Before: | ||
|
||
```rust,no_run | ||
let map_handle: Handle<TiledMap> = asset_server.load("map.tmx"); | ||
commands.spawn(( | ||
TiledMapHandle(map_handle), | ||
TiledMapSettings { | ||
map_initial_transform: Transform::from_xyz(150., 100., 0.), | ||
map_initial_visibility: Visibility::Hidden, | ||
..Default::default() | ||
}, | ||
)); | ||
``` | ||
|
||
After: | ||
|
||
```rust,no_run | ||
let map_handle: Handle<TiledMap> = asset_server.load("map.tmx"); | ||
commands.spawn(( | ||
TiledMapHandle(map_handle), | ||
Transform::from_xyz(150., 100., 0.), | ||
Visibility::Hidden, | ||
)); | ||
``` |