Conversation
| }, | ||
| entities: { | ||
| 0: ( | ||
| 4294967296: ( |
There was a problem hiding this comment.
Why use a random number and not 1?
There was a problem hiding this comment.
It's not random :')
I've updated the first line in the PR description to be more clear.
There was a problem hiding this comment.
Ah, maybe add a comment so its more clear why that number is being used?
There was a problem hiding this comment.
Honestly the entire example is flawed and bound to be reworked when proper scene infrastructure rolls around, hopefully soon. Not sure if it's worth documenting at this point, you honestly just should not do serialization the way this example does, but I don't think deleting the example is an option
|
If that fixes an example I'm all for it :D That said ; isn't the root cause using Footnotes
|
|
Yep. This entire way of serializing entities is terribly flawed, but the example exists as-is so it's better if it actually works. |
Since #9907 the generation starts at
1instead of0soEntity::to_bitsnow returns4294967296(ie.u32::MAX + 1) as the lowest number instead of0.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