-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update readme on deprecations, migrations, and latest bevy commit
- Loading branch information
1 parent
7e7f13d
commit 0fad555
Showing
4 changed files
with
26 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Migration Notes | ||
|
||
## Migrating from v0.2 to v0.3 | ||
|
||
As v0.3 is a breaking change to v0.2, the process to migrate over is fairly simple. The rand algorithm crates can no longer be used directly, but they can be swapped wholesale with `bevy_prng` instead. So the following `Cargo.toml` changes: | ||
|
||
```diff | ||
- rand_chacha = { version = "0.3", features = ["serde1"] } | ||
+ bevy_prng = { version = "0.1", features = ["rand_chacha"] } | ||
``` | ||
|
||
allows then you to swap your import like so, which should then plug straight into existing `bevy_rand` usage seamlessly: | ||
|
||
```diff | ||
use bevy::prelude::*; | ||
use bevy_rand::prelude::*; | ||
- use rand_chacha::ChaCha8Rng; | ||
+ use bevy_prng::ChaCha8Rng; | ||
``` | ||
|
||
This **will** change the type path and the serialization format for the PRNGs, but currently, moving between different bevy versions has this problem as well as there's currently no means to migrate serialized formats from one version to another yet. The rationale for this change is to enable stable `TypePath` that is being imposed by bevy's reflection system, so that future compiler changes won't break things unexpectedly as `std::any::type_name` has no stability guarantees. Going forward, this should resolve any stability problems `bevy_rand` might have and be able to hook into any migration tool `bevy` might offer for when scene formats change/update. |
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