Skip to content

Commit

Permalink
Fix scene example (#11289)
Browse files Browse the repository at this point in the history
Since #9907 the generation starts at `1` instead of `0` so
`Entity::to_bits` now returns `4294967296` (ie. `u32::MAX + 1`) as the
lowest number instead of `0`.

Without this change scene loading fails with this error message:
`ERROR bevy_asset::server: Failed to load asset
'scenes/load_scene_example.scn.ron' with asset loader
'bevy_scene::scene_loader::SceneLoader': Could not parse RON: 8:6:
Invalid generation bits`
  • Loading branch information
tim-blackbird authored Jan 22, 2024
1 parent 8ad1b93 commit 1e7e6c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/scenes/load_scene_example.scn.ron
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
),
},
entities: {
0: (
4294967296: (
components: {
"bevy_transform::components::transform::Transform": (
translation: (
Expand Down Expand Up @@ -34,7 +34,7 @@
),
},
),
1: (
4294967297: (
components: {
"scene::ComponentA": (
x: 3.0,
Expand Down

0 comments on commit 1e7e6c9

Please sign in to comment.