Expand description
use bevy::prelude::*; to import common components, bundles, and plugins.
Modules§
- ops
- This mod re-exports the correct versions of floating-point operations with
unspecified precision in the standard library depending on whether the
libmcrate feature is enabled. - vec
- A contiguous growable array type with heap-allocated contents, written
Vec<T>.
Macros§
- children
- Returns a
SpawnRelatedBundlethat will insert theChildrencomponent, spawn aSpawnableListof entities with given bundles that relate to theChildrenentity via theChildOfcomponent, and reserve space in theChildrenfor each spawned entity. - debug
- Constructs an event at the debug level.
- debug_
once - Call
debug!once per call site. - debug_
span - Constructs a span at the debug level.
- error
- Constructs an event at the error level.
- error_
once - Call
error!once per call site. - error_
span - Constructs a span at the error level.
- format
- Creates a
Stringusing interpolation of runtime expressions. - info
- Constructs an event at the info level.
- info_
once - Call
info!once per call site. - info_
span - Constructs a span at the info level.
- once
- Call some expression only once per call site.
- related
- Returns a
SpawnRelatedBundlethat will insert the givenRelationshipTarget, spawn aSpawnableListof entities with given bundles that relate to theRelationshipTargetentity via theRelationshipTarget::Relationshipcomponent, and reserve space in theRelationshipTargetfor each spawned entity. - trace
- Constructs an event at the trace level.
- trace_
once - Call
trace!once per call site. - trace_
span - Constructs a span at the trace level.
- vec
- Creates a
Veccontaining the arguments. - warn
- Constructs an event at the warn level.
- warn_
once - Call
warn!once per call site. - warn_
span - Constructs a span at the warn level.
Structs§
- Add
- Trigger emitted when a component is inserted onto an entity that does not already have that
component. Runs before
Insert. SeeComponentHooks::on_addfor more information. - Added
- A filter on a component that only retains results the first time after they have been added.
- Allow
- Allows a query to contain entities with the component
T, bypassingDefaultQueryFilters. - Annulus
- A primitive shape formed by the region between two circles, also known as a ring.
- AnyOf
- The
AnyOfquery parameter fetches entities with any of the component types included in T. - App
Appis the primary API for writing user applications. It automates the setup of a standard lifecycle and provides interface glue for plugins.- AppType
Registry - A
ResourcestoringTypeRegistryfor type registrations relevant to a whole app. - Apply
Deferred - A special
Systemthat instructs the executor to callSystem::apply_deferredon the systems that have run but not applied theirDeferredsystem parameters (likeCommands) or other system buffers. - Arc2d
- A primitive representing an arc between two points on a circle.
- Axis
- Stores the position data of the input devices of type
T. - BVec2
- A 2-dimensional
boolvector mask. - BVec3
- A 3-dimensional
boolvector mask. - BVec4
- A 4-dimensional
boolvector mask. - BVec3A
- A 3-dimensional SIMD vector mask.
- BVec4A
- A 4-dimensional SIMD vector mask.
- Bevy
Error - The built in “universal” Bevy error type. This has a blanket
Fromimpl for any type that implements Rust’sError, meaning it can be used as a “catch all” error. - Box
- A pointer type that uniquely owns a heap allocation of type
T. - Button
Input - A “press-able” input of type
T. - Capsule2d
- A 2D capsule primitive, also known as a stadium or pill shape.
- Capsule3d
- A 3D capsule primitive centered on the origin A three-dimensional capsule is defined as a surface at a distance (radius) from a line
- Changed
- A filter on a component that only retains results the first time after they have been added or mutably dereferenced.
- ChildOf
- Stores the parent entity of this child entity with this component.
- Children
- Tracks which entities are children of this parent entity.
- Circle
- A circle primitive, representing the set of points some distance from the origin
- Circular
Sector - A primitive representing a circular sector: a pie slice of a circle.
- Circular
Segment - A primitive representing a circular segment: the area enclosed by the arc of a circle and its chord (the line between its endpoints).
- Commands
- A
Commandqueue to perform structural changes to theWorld. - Cone
- A cone primitive centered on the midpoint between the tip of the cone and the center of its base.
- Conical
Frustum - A conical frustum primitive. A conical frustum can be created by slicing off a section of a cone.
- Convex
Polygon - A convex polygon with
Nvertices. - CubicB
Spline - A spline interpolated continuously across the nearest four control points. The curve does not necessarily pass through any of the control points.
- Cubic
Bezier - A spline composed of a single cubic Bezier curve.
- Cubic
Cardinal Spline - A spline interpolated continuously across the nearest four control points, with the position of
the curve specified at every control point and the tangents computed automatically. The associated
CubicCurvehas one segment between each pair of adjacent control points. - Cubic
Curve - A collection of
CubicSegments chained into a single parametric curve. It is aCurvewith domain[0, N], whereNis its number of segments. - Cubic
Hermite - A spline interpolated continuously between the nearest two control points, with the position and velocity of the curve specified at both control points. This curve passes through all control points, with the specified velocity which includes direction and parametric speed.
- Cubic
Nurbs - Non-uniform Rational B-Splines (NURBS) are a powerful generalization of the
CubicBSplinewhich can represent a much more diverse class of curves (like perfect circles and ellipses). - Cubic
Segment - A segment of a cubic curve, used to hold precomputed coefficients for fast interpolation.
It is a
Curvewith domain[0, 1]. - Cuboid
- A cuboid primitive, which is like a cube, except that the x, y, and z dimensions are not required to be the same.
- Cylinder
- A cylinder primitive centered on the origin
- Debug
Name - Wrapper to help debugging ECS issues. This is used to display the names of systems, components, …
- Default
Plugins - This plugin group will add all the default plugins for a Bevy application:
- Deferred
- A
SystemParamthat stores a buffer which gets applied to theWorldduringApplyDeferred. This is used internally byCommandsto deferWorldmutations. - Despawn
EntityEventemitted for each component on an entity when it is despawned. SeeComponentHooks::on_despawnfor more information.- Dir2
- A normalized vector pointing in a direction in 2D space
- Dir3
- A normalized vector pointing in a direction in 3D space
- Dir3A
- A normalized SIMD vector pointing in a direction in 3D space.
- Ellipse
- An ellipse primitive, which is like a circle, but the width and height can be different
- Entity
- Lightweight identifier of an entity.
- Entity
Commands - A list of commands that will be run to modify an
Entity. - Entity
Mut - Provides mutable access to a single entity and all of its components.
- Entity
Ref - A read-only reference to a particular
Entityand all of its components. - Entity
World Mut - A mutable reference to a particular
Entity, and the entire world. - Extrusion
- A 3D shape representing an extruded 2D
base_shape. - Filtered
Resources - Provides read-only access to a set of
Resources defined by the containedAccess. - Filtered
Resources Mut - Provides mutable access to a set of
Resources defined by the containedAccess. - First
- Runs first in the schedule.
- Fixed
- The fixed timestep game clock following virtual time.
- Fixed
First - Runs first in the
FixedMainschedule. - Fixed
Last - The schedule that runs last in
FixedMain - 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. - Gamepad
- Stores a connected gamepad’s metadata such as the name and its
GamepadButtonandGamepadAxis. - Gamepad
Settings - Gamepad settings component.
- Global
Transform GlobalTransformis an affine transformation from entity-local coordinates to worldspace coordinates.- Has
- Returns a bool that describes if an entity has the component
T. - IRect
- A rectangle defined by two opposite corners.
- IVec2
- A 2-dimensional vector.
- IVec3
- A 3-dimensional vector.
- IVec4
- A 4-dimensional vector.
- If
- A
SystemParamthat wraps another parameter and causes its system to skip instead of failing when the parameter is invalid. - In
- A
SystemInputtype which denotes that aSystemreceives an input value of typeTfrom its caller. - InMut
- A
SystemInputtype which denotes that aSystemreceives a mutable reference to a value of typeTfrom its caller. - InRef
- A
SystemInputtype which denotes that aSystemreceives a read-only reference to a value of typeTfrom its caller. - Infinite
Plane3d - An unbounded plane in 3D space. It forms a separating surface through the origin, stretching infinitely far
- Insert
- Trigger emitted when a component is inserted, regardless of whether or not the entity already
had that component. Runs after
Add, if it ran. SeeComponentHooks::on_insertfor more information. - Isometry2d
- An isometry in two dimensions, representing a rotation followed by a translation. This can often be useful for expressing relative positions and transformations from one position to another.
- Isometry3d
- An isometry in three dimensions, representing a rotation followed by a translation. This can often be useful for expressing relative positions and transformations from one position to another.
- Last
- Runs last in the schedule.
- Line2d
- An infinite line going through the origin along a direction in 2D space.
- Line3d
- An infinite line going through the origin along a direction in 3D space.
- Local
- A system local
SystemParam. - Main
- The schedule that contains the app logic that is evaluated each tick of
App::update(). - Mat2
- A 2x2 column major matrix.
- Mat3
- A 3x3 column major matrix.
- Mat4
- A 4x4 column major matrix.
- Mat3A
- A 3x3 column major matrix.
- Message
Mutator - Mutably reads messages of type
Tkeeping track of which messages have already been read by each system allowing multiple systems to read the same messages. Ideal for chains of systems that all want to modify the same messages. - Message
Reader - Reads
Messages of typeTin order and tracks which messages have already been read. - Message
Writer - Writes
Messages of typeT. - Messages
- A message collection that represents the messages that occurred within the last two
Messages::updatecalls. Messages can be written to using aMessageWriterand are typically cheaply read using aMessageReader. - Minimal
Plugins - This plugin group will add the minimal plugins for a Bevy application:
- Mut
- Unique mutable borrow of an entity’s component or of a resource.
- Name
- Component used to identify an entity. Stores a hash for faster comparisons.
- Name
OrEntity - Convenient query for giving a human friendly name to an entity.
- NonSend
- Shared borrow of a non-
Sendresource. - NonSend
Mut - Unique borrow of a non-
Sendresource. - Observer
- An
Observersystem. Add thisComponentto anEntityto turn it into an “observer”. - On
- A system parameter used by an observer to process events. See
ObserverandEventfor examples. - Or
- A filter that tests if any of the given filters apply.
- Parallel
Commands - An alternative to
Commandsthat can be used in parallel contexts, such as those inQuery::par_iter. - Param
Set - A collection of potentially conflicting
SystemParams allowed by disjoint access. - Plane2d
- An unbounded plane in 2D space. It forms a separating surface through the origin, stretching infinitely far
- Plane3d
- A bounded plane in 3D space. It forms a surface starting from the origin with a defined height and width.
- Polygon
- A polygon with N vertices.
- Polyline2d
- A series of connected line segments in 2D space.
- Polyline3d
- A series of connected line segments in 3D space.
- Populated
- System parameter that works very much like
Queryexcept it always contains at least one matching entity. - 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”. - Quat
- A quaternion representing an orientation.
- Query
- A system parameter that provides selective access to the
Componentdata stored in aWorld. - Query
Builder - Builder struct to create
QueryStateinstances at runtime. - Query
State - Provides scoped access to a
Worldstate according to a givenQueryDataandQueryFilter. - Rational
Curve - A collection of
RationalSegments chained into a single parametric curve. It is aCurvewith domain[0, N], whereNis the number of segments. - Rational
Segment - A segment of a rational cubic curve, used to hold precomputed coefficients for fast interpolation.
It is a
Curvewith domain[0, 1]. - Ray2d
- An infinite half-line starting at
originand going indirectionin 2D space. - Ray3d
- An infinite half-line starting at
originand going indirectionin 3D space. - Real
- Real time clock representing elapsed wall clock time.
- Rect
- A rectangle defined by two opposite corners.
- Rectangle
- A rectangle primitive, which is like a square, except that the width and height can be different
- Ref
- Shared borrow of an entity’s component with access to change detection.
Similar to
Mutbut is immutable and so doesn’t require unique access. - Reflect
Component - A struct used to operate on reflected
Componenttrait of a type. - Reflect
Default - A struct used to provide the default value of a type.
- Reflect
Deserialize - A struct used to deserialize reflected instances of a type.
- Reflect
From Reflect - Type data that represents the
FromReflecttrait and allows it to be used dynamically. - Reflect
From World - A struct used to operate on the reflected
FromWorldtrait of a type. - Reflect
Resource - A struct used to operate on reflected
Resourceof a type. - Reflect
Serialize - A struct used to serialize reflected instances of a type.
- Regular
Polygon - A polygon centered on the origin where all vertices lie on a circle, equally far apart.
- Remove
- Trigger emitted when a component is removed from an entity, and runs before the component is
removed, so you can still access the component data.
See
ComponentHooks::on_removefor more information. - Removed
Components - A
SystemParamthat yields entities that had theirTComponentremoved or have been despawned with it. - Replace
- Trigger emitted when a component is removed from an entity, regardless of whether or not it is later replaced.
- Res
- Shared borrow of a
Resource. - ResMut
- Unique mutable borrow of a
Resource. - Rhombus
- A rhombus primitive, also known as a diamond shape. A four sided polygon, centered on the origin, where opposite sides are parallel but without requiring right angles.
- Rot2
- A 2D rotation.
- RunFixed
Main Loop - Runs the
FixedMainschedule in a loop according until all relevant elapsed time has been “consumed”. - Schedule
- A collection of systems, and the metadata and executor needed to run them in a certain order under certain conditions.
- Schedules
- Resource that stores
Schedules mapped toScheduleLabels excluding the current runningSchedule. - Segment2d
- A line segment defined by two endpoints in 2D space.
- Segment3d
- A line segment defined by two endpoints in 3D space.
- Short
Name - Lazily shortens a type name to remove all module paths.
- Single
- System parameter that provides access to single entity’s components, much like
Query::single/Query::single_mut. - Spawn
- A wrapper over a
Bundleindicating that an entity should be spawned with thatBundle. This is intended to be used for hierarchical spawning via traits likeSpawnableListandSpawnRelated. - Spawn
Iter - A
SpawnableListthat spawns entities using an iterator of a givenBundle: - Spawn
Scene - The schedule that contains scene spawning.
- Spawn
With - A
SpawnableListthat spawns entities using aFnOncewith aRelatedSpawneras an argument: - Sphere
- A sphere primitive, representing the set of all points some distance from the origin
- Startup
- The schedule that runs once when the app starts.
- String
- A UTF-8–encoded, growable string.
- SubApp
- A secondary application with its own
World. These can run independently of each other. - 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. - Tetrahedron
- A tetrahedron primitive.
- Time
- A generic clock resource that tracks how much it has advanced since its previous update and since its creation.
- Timer
- Tracks elapsed time. Enters the finished state once
durationis reached. - Torus
- A torus primitive, often representing a ring or donut shape The set of points some distance from a circle centered at the origin
- Touch
Input - A touch input event.
- Touches
- A collection of
Touches. - Transform
- Describe the position of an entity. If the entity has a parent, the position is relative to its parent position.
- Transform
Helper - System parameter for computing up-to-date
GlobalTransforms. - Transform
Plugin - The base plugin for handling
Transformcomponents - Transform
Tree Changed - An optimization for transform propagation. This ZST marker component uses change detection to
mark all entities of the hierarchy as “dirty” if any of their descendants have a changed
Transform. If this component is not markedis_changed(), propagation will halt. - Triangle2d
- A triangle in 2D space
- Triangle3d
- A 3D triangle primitive.
- URect
- A rectangle defined by two opposite corners.
- UVec2
- A 2-dimensional vector.
- UVec3
- A 3-dimensional vector.
- UVec4
- A 4-dimensional vector.
- Update
- The schedule that contains any app logic that must run once per render frame.
For most gameplay logic, consider using
FixedUpdateinstead. - Vec
- A contiguous growable array type, written as
Vec<T>, short for ‘vector’. - Vec2
- A 2-dimensional vector.
- Vec3
- A 3-dimensional vector.
- Vec4
- A 4-dimensional vector.
- Vec3A
- A 3-dimensional vector.
- Virtual
- The virtual game clock representing game time.
- With
- Filter that selects entities with a component
T. - With
OneRelated - A wrapper over an
Entityindicating that an entity should be added. This is intended to be used for hierarchical spawning via traits likeSpawnableListandSpawnRelated. - With
Related - A
SpawnableListthat links already spawned entities to the root entity via relations of typeI. - Without
- Filter that selects entities without a component
T. - World
- Stores and exposes operations on entities, components, resources, and their associated metadata.
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. - Convex
Polygon Error - An error that happens when creating a
ConvexPolygon. - Cubic
Nurbs Error - Error during construction of
CubicNurbs - Euler
Rot - Euler rotation sequences.
- Gamepad
Axis - Represents gamepad input types that are mapped in the range [-1.0, 1.0].
- Gamepad
Button - Represents gamepad input types that are mapped in the range [0.0, 1.0].
- KeyCode
- The key code of a
KeyboardInput. - Mouse
Button - A button on a mouse device.
- 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. - Timer
Mode - Specifies
Timerbehavior. - Torus
Kind - The type of torus determined by the minor and major radii
- Transform
Systems - Set enum for the systems relating to transform propagation
- Winding
Order - The winding order for a set of points
Traits§
- Build
Children Transform Ext - Collection of methods similar to the built-in parenting methods on
EntityWorldMutandEntityCommands, but preserving each entity’sGlobalTransform. - Bundle
- The
Bundletrait enables insertion and removal ofComponents from an entity. - Command
- A
Worldmutation. - Component
- A data type that can be used to store data for an entity.
- Contains
Entity - A trait for types that contain an
Entity. - Cubic
Generator - Implement this on cubic splines that can generate a cubic curve from their spline parameters.
- Cyclic
Cubic Generator - Implement this on cubic splines that can generate a cyclic cubic curve from their spline parameters.
- Detect
Changes - Types that can read change detection information.
This change detection is controlled by
DetectChangesMuttypes such asResMut. - Detect
Changes Mut - Types that implement reliable change detection.
- Entity
Command - A command which gets executed for a given
Entity. - Entity
Event - An
EntityEventis anEventthat is triggered for a specificEntityEvent::event_targetentity: - Entity
Mapper - An implementor of this trait knows how to map an
Entityinto anotherEntity. - Event
- An
Eventis something that “happens” at a given moment. - Float
Ext - A trait for extending
f32andf64with extra methods. - From
Reflect - A trait that enables types to be dynamically constructed from reflected data.
- From
World - Creates an instance of the type this trait is implemented for
using data from the supplied
World. - GetField
- A convenience trait which combines fetching and downcasting of struct fields.
- GetPath
- A trait which allows nested
Reflectvalues to be retrieved with path strings. - GetTuple
Struct Field - A convenience trait which combines fetching and downcasting of tuple struct fields.
- Into
Schedule Configs - Types that can convert into a
ScheduleConfigs. - Into
System - Conversion trait to turn something into a
System. - Into
System Set - Types that can be converted into a
SystemSet. - Measured2d
- A trait for getting measurements of 2D shapes
- Measured3d
- A trait for getting measurements of 3D shapes
- Message
- A buffered message for pull-based event handling.
- Partial
Reflect - The foundational trait of
bevy_reflect, used for accessing and modifying data dynamically. - Plugin
- A collection of Bevy app logic and configuration.
- Plugin
Group - Combines multiple
Plugins into a single unit. - Primitive2d
- A marker trait for 2D primitives
- Primitive3d
- A marker trait for 3D primitives
- Rational
Generator - Implement this on cubic splines that can generate a rational cubic curve from their spline parameters.
- Read
Only System Systemtypes that do not modify theWorldwhen run. This is implemented for any systems whose parameters all implementReadOnlySystemParam.- Reflect
- A core trait of
bevy_reflect, used for downcasting to concrete types. - Reflect
Path - Something that can be interpreted as a reflection path in
GetPath. - Relationship
Target - A
Componentcontaining the collection of entities that relate to thisEntityvia the associatedRelationshiptype. See theRelationshipdocumentation for more information. - Resource
- A type that can be inserted into a
Worldas a singleton. - Spawn
Related RelationshipTargetmethods that create aBundlewith aDynamicBundle::Effectthat:- Stable
Interpolate - A type with a natural interpolation that provides strong subdivision guarantees.
- Struct
- A trait used to power struct-like operations via reflection.
- System
- An ECS system that can be added to a
Schedule - System
Condition - A system that determines if one or more scheduled systems should run.
- System
Input - Trait for types that can be used as input to
Systems. - System
Param Builder - A builder that can create a
SystemParam. - System
Param Function - A trait implemented for all functions that can be used as
Systems. - System
Set - System sets are tag-like labels that can be used to group systems together.
- ToOwned
- A generalization of
Cloneto borrowed data. - ToString
- A trait for converting a value to a
String. - Transform
Point - A trait for point transformation methods.
- Tuple
Struct - A trait used to power tuple struct-like operations via reflection.
- Type
Path - A static accessor to type paths and names.
- Vec2
Swizzles - Vec3
Swizzles - Vec4
Swizzles
Functions§
- any_
component_ removed - A
SystemCondition-satisfying system that returnstrueif there are any entity with a component of the given type removed. - any_
match_ filter - A
SystemCondition-satisfying system that returnstrueif there are any entities that match the givenQueryFilter. - any_
with_ component - A
SystemCondition-satisfying system that returnstrueif there are any entities with the given component type. - bvec2
- Creates a 2-dimensional
boolvector mask. - bvec3
- Creates a 3-dimensional
boolvector mask. - bvec4
- Creates a 4-dimensional
boolvector mask. - bvec3a
- Creates a 3-dimensional
boolvector mask. - bvec4a
- Creates a 4-dimensional
boolvector mask. - condition_
changed - Generates a
SystemConditionthat returns true when the passed one changes. - condition_
changed_ to - Generates a
SystemConditionthat returns true when the result of the passed one went from false to true since the last time this was called. - default
- An ergonomic abbreviation for
Default::default()to make initializing structs easier. - ivec2
- Creates a 2-dimensional vector.
- ivec3
- Creates a 3-dimensional vector.
- ivec4
- Creates a 4-dimensional vector.
- mat2
- Creates a 2x2 matrix from two column vectors.
- mat3
- Creates a 3x3 matrix from three column vectors.
- mat4
- Creates a 4x4 matrix from four column vectors.
- mat3a
- Creates a 3x3 matrix from three column vectors.
- not
- Generates a
SystemConditionthat inverses the result of passed one. - on_
event Deprecated - A
SystemCondition-satisfying system that returnstrueif there are any new events of the given type since it was last called. - on_
message - A
SystemCondition-satisfying system that returnstrueif there are any new messages of the given type since it was last called. - quat
- Creates a quaternion from
x,y,zandwvalues. - resource_
added - A
SystemCondition-satisfying system that returnstrueif the resource of the given type has been added since the condition was last checked. - resource_
changed - A
SystemCondition-satisfying system that returnstrueif the resource of the given type has been added or mutably dereferenced since the condition was last checked. - resource_
changed_ or_ removed - A
SystemCondition-satisfying system that returnstrueif the resource of the given type has been added, removed or mutably dereferenced since the condition was last checked. - resource_
equals - Generates a
SystemCondition-satisfying closure that returnstrueif the resource is equal tovalue. - resource_
exists - A
SystemCondition-satisfying system that returnstrueif the resource exists. - resource_
exists_ and_ changed - A
SystemCondition-satisfying system that returnstrueif the resource of the given type has been added or mutably dereferenced since the condition was last checked. - resource_
exists_ and_ equals - Generates a
SystemCondition-satisfying closure that returnstrueif the resource exists and is equal tovalue. - resource_
removed - A
SystemCondition-satisfying system that returnstrueif the resource of the given type has been removed since the condition was last checked. - run_
once - A
SystemCondition-satisfying system that returnstrueon the first time the condition is run and false every time after. - uvec2
- Creates a 2-dimensional vector.
- uvec3
- Creates a 3-dimensional vector.
- uvec4
- Creates a 4-dimensional vector.
- vec2
- Creates a 2-dimensional vector.
- vec3
- Creates a 3-dimensional vector.
- vec4
- Creates a 4-dimensional vector.
- vec3a
- Creates a 3-dimensional vector.
Type Aliases§
- Child
Spawner - A type alias over
RelatedSpawnerused to spawn child entities containing aChildOfrelationship. - Child
Spawner Commands - A type alias over
RelatedSpawnerCommandsused to spawn child entities containing aChildOfrelationship. - Event
Reader Deprecated - This is deprecated. See
MessageReader - Event
Writer Deprecated - This is deprecated. See
MessageWriter - Events
Deprecated - This is deprecated. See
Messages - OnAdd
Deprecated - Deprecated in favor of
Add. - OnDespawn
Deprecated - Deprecated in favor of
Despawn. - OnInsert
Deprecated - Deprecated in favor of
Insert. - OnRemove
Deprecated - Deprecated in favor of
Remove. - OnReplace
Deprecated - Deprecated in favor of
Replace. - Result
- A result type for use in fallible systems, commands and observers.
- System
In - Shorthand way to get the
System::Infor aSystemas aSystemInput::Inner. - Trigger
Deprecated - Deprecated in favor of
On.
Attribute Macros§
- bevy_
main - Generates the required main function boilerplate for Android.
- reflect_
trait - A macro that automatically generates type data for traits, which their implementors can then register.
Derive Macros§
- Bundle
- Implement the
Bundletrait. - Component
- Cheat sheet for derive syntax,
see full explanation and examples on the
Componenttrait doc. - Deref
- Implements
Dereffor structs. This is especially useful when utilizing the newtype pattern. - Deref
Mut - Implements
DerefMutfor structs. This is especially useful when utilizing the newtype pattern. - Entity
Event - Cheat sheet for derive syntax,
see full explanation on
EntityEventtrait docs. - Event
- Implement the
Eventtrait. - From
Reflect - Derives the
FromReflecttrait. - From
World - Implement the
FromWorldtrait. - Message
- Implement the
Messagetrait. - Reflect
- The main derive macro used by
bevy_reflectfor deriving itsReflecttrait. - Resource
- Implement the
Resourcetrait. - System
Set - Derive macro generating an impl of the trait
SystemSet. - Type
Path - Derives the
TypePathtrait, providing a stable alternative to [std::any::type_name].