Expand description
Types for declaring and storing Component
s.
Structs§
- Check
Change Ticks - An
Event
that can be used to maintainTick
s in custom data structures, enabling to make use of bevy’s periodic checks that clamps ticks to a certain range, preventing overflows and thus keeping methods likeTick::is_newer_than
reliably returnfalse
for ticks that got too old. - Component
Descriptor - A value describing a component or resource, which may or may not correspond to a Rust type.
- Component
Id - A value which uniquely identifies the type of a
Component
orResource
within aWorld
. - Component
IdFor - A
SystemParam
that provides access to theComponentId
for a specific component type. - Component
Ids - Generates
ComponentId
s. - Component
Info - Stores metadata for a type of component or resource stored in a specific
World
. - Component
Ticks - Records when a component or resource was added and when it was last mutably dereferenced (or added).
- Components
- Stores metadata associated with each kind of
Component
in a givenWorld
. - Components
Queued Registrator - A type that enables queuing registration in
Components
. - Components
Registrator - A
Components
wrapper that enables additional features, like registration. - Immutable
- Parameter indicating a
Component
is immutable. - Mutable
- Parameter indicating a
Component
is mutable. - Queued
Components - Allows queuing components to be registered.
- Required
Component - Metadata associated with a required component. See
Component
for details. - Required
Component Constructor - A Required Component constructor. See
Component
for details. - Required
Components - The collection of metadata for components that are required for a given component.
- Required
Components Registrator - This is a safe handle around
ComponentsRegistrator
andRequiredComponents
to register required components. - Tick
- A value that tracks when a system ran relative to other systems. This is used to power change detection.
- Tick
Cells - Interior-mutable access to the
Tick
s for a single component or resource.
Enums§
- Component
Clone Behavior - The clone behavior to use when cloning or moving a
Component
. - Required
Components Error - An error returned when the registration of a required component fails.
- Storage
Type - The storage used for a specific component type.
Traits§
- Component
- A data type that can be used to store data for an entity.
- Component
Mutability - The mutability option for a
Component
. This can either be:
Functions§
- component_
clone_ ignore - Noop implementation of component clone handler function.
- component_
clone_ via_ clone - Component clone handler function implemented using the
Clone
trait. Can be set as clone handler for the specific component it is implemented for. It will panic if set as handler for any other component. - component_
clone_ via_ reflect - Component clone handler function implemented using reflect. Can be set as clone handler for any registered component, but only reflected components will be cloned.
Type Aliases§
- Component
Clone Fn - Function type that can be used to clone a component of an entity.
Derive Macros§
- Component
- Cheat sheet for derive syntax,
see full explanation and examples on the
Component
trait doc.