Expand description
Systems to insert components on loaded scenes.
Hooks allow you to run code on a scene after loading it. It provides an API
similar to the bevy SceneBundle, but with the ability to add components
to scene entities once they are loaded.
This crate has two hook types:
- The very basic
SceneHook, it has ahookfunction field. It will run once per entity within the scene, with the ability to add new components to the entity and read its existing components. - The more advanced
reload::Hook. Which works likeSceneHook, but is aware of reload state, and also has access to the ECS&Worldand the rootEntityof the scene it is running for.
The the respective documentation of SceneHook and reload::Hook for
usage examples.
Modules§
Structs§
- Hook
Plugin - Plugin to run hooks associated with spawned scenes.
- Hooked
Dynamic Scene Bundle - Bundle a
SceneHookwith dynamic scenesDynamicSceneBundlecomponents. - Hooked
Scene Bundle - Bundle a
SceneHookwith the standardSceneBundlecomponents. - Hooked
Scene State - Convenience parameter to query if a scene marked with
Mhas been loaded. - Scene
Hook - Add this as a component to any entity to run
hookwhen the scene is loaded. - Scene
Hooked - Marker Component for scenes that were hooked.
Enums§
- Systems
- Systems defined in the
bevy_scene_hookcrate (this crate).
Functions§
- is_
scene_ hooked - Convenience run criteria to query if a scene marked with
Mhas been loaded. - run_
hooks - Run once
SceneHooks added toSceneBundleorDynamicSceneBundlewhen the scenes are loaded.