Expand description
This crate is about everything concerning the highest-level, application layer of a Bevy app.
Re-exports§
pub use ctrlc;
Modules§
Macros§
- plugin_
group - A macro for generating a well-documented
PluginGroupfrom a list ofPluginpaths.
Structs§
- Animation
Systems - Animation system set. This exists in
PostUpdate. - App
Appis the primary API for writing user applications. It automates the setup of a standard lifecycle and provides interface glue for plugins.- First
- Runs first in the schedule.
- Fixed
First - Runs first in the
FixedMainschedule. - Fixed
Last - The schedule that runs last in
FixedMain - Fixed
Main - The schedule that contains systems which only run after a fixed period of time has elapsed.
- Fixed
Main Schedule Order - Defines the schedules to be run for the
FixedMainschedule, including their order. - Fixed
Post Update - The schedule that runs after the
FixedUpdateschedule, for reacting to changes made in the main update logic. - Fixed
PreUpdate - The schedule that contains logic that must run before
FixedUpdate. - Fixed
Update - The schedule that contains most gameplay logic, which runs at a fixed rate rather than every render frame.
For logic that should run once per render frame, use the
Updateschedule instead. - Hierarchy
Propagate Plugin - Plugin to automatically propagate a component value to all direct and transient relationship
targets (e.g.
bevy_ecs::hierarchy::Children) of entities with aPropagatecomponent. - Inherited
- Internal struct for managing propagation
- Last
- Runs last in the schedule.
- Main
- The schedule that contains the app logic that is evaluated each tick of
App::update(). - Main
Schedule Order - Defines the schedules to be run for the
Mainschedule, including their order. - Main
Schedule Plugin - Initializes the
Mainschedule, sub schedules, and resources for a givenApp. - Panic
Handler Plugin - Adds sensible panic handlers to Apps. This plugin is part of the
DefaultPlugins. Adding this plugin will setup a panic hook appropriate to your target platform: - Plugin
Group Builder - Facilitates the creation and configuration of a
PluginGroup. - Post
Startup - The schedule that runs once after
Startup. - Post
Update - The schedule that contains logic that must run after
Update. For example, synchronizing “local transforms” in a hierarchy to “global” absolute transforms. This enables thePostUpdatetransform-sync system to react to “local transform” changes inUpdatewithout theUpdatesystems needing to know about (or add scheduler dependencies for) the “global transform sync system”. - PreStartup
- The schedule that runs before
Startup. - PreUpdate
- The schedule that contains logic that must run before
Update. For example, a system that reads raw keyboard input OS events into aMessagesresource. This enables systems inUpdateto consume the messages from theMessagesresource without actually knowing about (or taking a direct scheduler dependency on) the “os-level keyboard event system”. - Propagate
- Causes the inner component to be added to this entity and all direct and transient relationship
targets. A target with a
Propagate<C>component of its own will override propagation from that point in the tree. - Propagate
Over - Stops the output component being added to this entity. Relationship targets will still inherit the component from this entity or its parents.
- Propagate
Set - The set in which propagation systems are added. You can schedule your logic relative to this set.
- Propagate
Stop - Stops the propagation at this entity. Children will not inherit the component.
- RunFixed
Main Loop - Runs the
FixedMainschedule in a loop according until all relevant elapsed time has been “consumed”. - Schedule
Runner Plugin - Configures an
Appto run itsScheduleaccording to a givenRunMode. - Spawn
Scene - The schedule that contains scene spawning.
- Startup
- The schedule that runs once when the app starts.
- SubApp
- A secondary application with its own
World. These can run independently of each other. - SubApps
- The collection of sub-apps that belong to an
App. - Task
Pool Options - Helper for configuring and creating the default task pools. For end-users who want full control,
set up
TaskPoolPlugin - Task
Pool Plugin - Setup of default task pools:
AsyncComputeTaskPool,ComputeTaskPool,IoTaskPool. - Task
Pool Thread Assignment Policy - Defines a simple way to determine how many threads to use given the number of remaining cores and number of total cores
- Terminal
CtrlC Handler Plugin (Unix and non- target_os=horizon, or Windows) andstd - Gracefully handles
Ctrl+Cby emitting aAppExitevent. This plugin is part of theDefaultPlugins. - Update
- The schedule that contains any app logic that must run once per render frame.
For most gameplay logic, consider using
FixedUpdateinstead.
Enums§
- AppExit
- A
Messagethat indicates theAppshould exit. If one or more of these are present at the end of an update, the runner will end and (maybe) return control to the caller. - Plugins
State - Plugins state in the application
- RunFixed
Main Loop Systems - Set enum for the systems that want to run inside
RunFixedMainLoop, but before or after the fixed update logic. Systems in this set will run exactly once per frame, regardless of the number of fixed updates. They will also run under a variable timestep. - RunMode
- Determines the method used to run an
App’sSchedule.
Traits§
- AppLabel
- A strongly-typed class of labels used to identify an
App. - DynEq
- An object safe version of
Eq. This trait is automatically implemented for any'statictype that implementsEq. - Plugin
- A collection of Bevy app logic and configuration.
- Plugin
Group - Combines multiple
Plugins into a single unit. - Plugins
- Types that represent a set of
Plugins.
Functions§
- propagate_
inherited - add/remove
Inherited::<C>for targets of entities with modifiedInherited::<C> - propagate_
output - add
Cto entities withInherited::<C> - update_
reparented - add/remove
Inherited::<C>andCfor entities which have changed relationship - update_
source - add/remove
Inherited::<C>andCfor entities with a directPropagate::<C> - update_
stopped - remove
Inherited::<C>andCfor entities with aPropagateStop::<C>
Type Aliases§
- Animation
Deprecated - Deprecated alias for
AnimationSystems. - Interned
AppLabel - A shorthand for
Interned<dyn AppLabel>. - RunFixed
Main Loop System Deprecated - Deprecated alias for
RunFixedMainLoopSystems.
Derive Macros§
- AppLabel
- Generates an impl of the
AppLabeltrait.