Migrating to 0.16.0
https://github.com/makspll/bevy_mod_scripting/pull/455
Replace all usages of CallbackSettings<P>.callback_handler
with P::handler()(..)
and P::handle(..)
https://github.com/makspll/bevy_mod_scripting/pull/456
Replace all usages of CallbackBuilder<P>.load
and CallbackBuilder<P>.reload
with P::load(..)
and P::reload(..)
or P::context_loader()(..)
and P::context_reloader()(..)
https://github.com/makspll/bevy_mod_scripting/pull/463
If you were relying on BMS enabling some features in Bevy crates, your builds might be pulling in less features than you expect. Ensure you explicitly select all features you need from bevy. BMS will now only pull in strictly necessary features and crates from bevy
https://github.com/makspll/bevy_mod_scripting/pull/470
Switch all references of ContextLoadingSettings
to P::readonly_config(world.id())
.
https://github.com/makspll/bevy_mod_scripting/pull/471
RuntimeSettings
and RuntimeContainer
are removed, replace usages with P::readonly_settings(world.id()).runtime)
access to initializers is no longer possible outside the plugin setup phase
https://github.com/makspll/bevy_mod_scripting/pull/472
if you implemented a scripting plugin you will need to correct your function signatures for the above aliases, and fetch the config yourself to access callbacks via Plugin::readonly_configuration(world_id)
using the world id you will now receive.
https://github.com/makspll/bevy_mod_scripting/pull/473
references to StaticScripts
should be replaced with appropriate resident calls on ScriptContext
filtered by the attachment kind
https://github.com/makspll/bevy_mod_scripting/pull/474
- ScriptContext Access: Use
.read()
and.write()
to access ScriptContext (now wrapped inArc<RwLock<>>
); replaceget()
withget_context()
- HandlerContext: Replace with direct ScriptContext access; remove any
with_handler_system_state()
calls - Script Callbacks: Use new
call_context_dynamic()
orcall_context()
methods from the CallContext trait - Custom Context Types: Implement the new
GetPluginFor
trait to provide mapping from context to plugin type - Lua Interaction: Replace
mlua::Lua
withLuaContext
wrapper type in all Lua code on BMS side - Script Callback Running: Replace
run_with_handler()
calls withrun_with_context()
orrun_with_contexts()
https://github.com/makspll/bevy_mod_scripting/pull/475
- References previously resident in
bevy_mod_scripting_core::asset
/bevy_mod_scripting::core::asset
will now need to come frombevy_mod_scripting_asset
orbevy_mod_scripting::asset
- Adding supported extensions will now need to be done via
scripting_plugin.add_supported_extension("extension")
rather than via the app directly - Plugin implementors will need to add the new crate as a dependency and should not directly rely on the top workspace crate
https://github.com/makspll/bevy_mod_scripting/pull/477
- Update imports to new crates (
bevy_mod_scripting_bindings
,bevy_mod_scripting_display
,bevy_mod_scripting_asset
) where appropriate, if you rely on the workspace these will be re-exported underbindings
,display
andasset
respectively - Replace
DisplayWithWorld
usage withDisplayWithTypeInfo
/DebugWithTypeInfo
and useWithTypeInfo::new(value)
in format strings. Ensure that the WorldGuard is in scope when printing using these utilities, or you might see raw type id's