8988b16bee
- Fix `ref` keyword used as variable name in code examples - Fix "retries next tick" → systems continue on normal schedule - Fix `State::set()` → `NextState::set()` in upgrade skill - Fix `SceneRoot` → `WorldAssetRoot` for 0.19 consistency - Fix Replace lifecycle event description (overwritten, not removed) - Fix grep patterns (quoting, trailing spaces) - Remove third-party physics/networking content (not Bevy built-ins)
2.3 KiB
2.3 KiB
0.18 → 0.19
Smaller than 0.17→0.18 but with one deep semantic change: resources became components. Official guide for the long tail: https://bevy.org/learn/migration-guides/0-18-to-0-19/.
Renames & moves (mechanical)
| Old (0.18) | New (0.19) |
|---|---|
Scene / SceneRoot |
WorldAsset / WorldAssetRoot |
AssetPath::resolve(&str) / resolve_embed(&str) |
resolve_str() / resolve_embed_str() (resolve()/resolve_embed() now take &AssetPath) |
Hdr in bevy_render |
bevy_camera |
Camera screen-space specular transmission fields |
ScreenSpaceTransmission component |
API shape changes
Assets::get_mutreturnsAssetMut<A>(mutation-tracked), not&mut A. Deref for access; code storing the&mut Aneeds restructuring.Ref<T>.clone()returnsRef<T>, not the inner value. Old code relying on clone-through must useval.deref().clone().- GLTF material loading returns
GltfMaterial; request aStandardMaterialwith the#Material0/stdlabel suffix. EntityComponentsTriggergained archetype fields — exhaustive destructuring breaks; add..:let EntityComponentsTrigger { components, .. } = e.trigger();
Semantic shifts (audit, don't just compile)
- Resources are components on abstract entities. Consequences:
Query<Entity>and other very broad queries now match resource entities. Any "iterate all entities" logic (cleanup sweeps, entity counts, serialization, debug overlays) silently includes resources — filter withWithout<IsResource>.- A type can no longer derive both
ComponentandResource. Split such types or pick one role.
- Scene rename is semantic-adjacent:
WorldAssetnaming reflects the same data model, but grep for the old names in strings/reflection paths, not just types.
Porting checklist
grep -rn "SceneRoot\|Scene>"— rename toWorldAssetRoot/WorldAsset.grep -rn "Query<Entity[,>]"and other broad queries — addWithout<IsResource>where resources must not appear.grep -rn "derive(Component" | grep "Resource"— find dual-derive types; split them.grep -rn "get_mut"onAssets<...>— adapt toAssetMut.grep -rn "EntityComponentsTrigger {"— add..to destructuring.- GLTF material handles — append
/stdlabels whereStandardMaterialis expected.