Specs Migration
-
Specs migration
Quick fix:
- Add
use amethyst::ecs::WorldExt
to imports. - Replace
world.add_resource
withworld.insert
. use amethyst::ecs::WorldExt;
forworld.read_resource
.- Regex replace
\bResources\b
withWorld
. Check for false replacements. - Replace
world.res
withworld
. - Regex replace
\bres\b
withworld
.
shred-derive
is re-exported byamethyst
. Migration steps:- Remove
shred-derive
fromCargo.toml
. - Remove
use amethyst::ecs::SystemData
from imports (if present). - Add
use amethyst::shred::{ResourceId, SystemData}
to imports.
- Add
-
PrefabLoaderSystem
is initialized byPrefabLoaderSystemDesc
.Quick fix:
- Find:
PrefabLoaderSystem::<([A-Za-z]+)>::default\(\)
, - Replace:
PrefabLoaderSystemDesc::<\1>::default()
- Don't forget to replace
with
withwith_system_desc
when adding to GameData.
- Find:
-
GltfSceneLoaderSystem
is initialized byGltfSceneLoaderSystemDesc
.Quick fix:
- Find:
GltfSceneLoaderSystem::<([A-Za-z]+)>::default\(\)
, - Replace:
GltfSceneLoaderSystemDesc::<\1>::default()
- Don't forget to replace
with
withwith_system_desc
when adding to GameData.
- Find:
-
AmethystApplication::with_setup
runs the function before the dispatcher.Quick fix:
- Find:
with_setup
, - Replace:
with_effect
- Find:
-
Renamed
UiTransformBuilder
toUiTransformData
. -
Renamed
UiTextBuilder
toUiTextData
. -
Renamed
UiButtonBuilder
toUiButtonData
.