Expand description
This module provides functionality to link entities to each other using specialized components called “relationships”. See the Relationship
trait for more info.
Structs§
- Directly spawns related “source” entities with the given
Relationship
, targeting a specific entity. - Uses commands to spawn related “source” entities with the given
Relationship
, targeting a specific entity.
Enums§
- Configures the conditions under which the Relationship insert/replace hooks will be run.
Traits§
- This trait signals that a
RelationshipSourceCollection
is ordered. - A
Component
on a “source”Entity
that references another targetEntity
, creating a “relationship” between them. EveryRelationship
has a correspondingRelationshipTarget
type (and vice-versa), which exists on the “target” entity of a relationship and contains the list of all “source” entities that relate to the given “target” - The internal
Entity
collection used by aRelationshipTarget
component. This is not intended to be modified directly by users, as it could invalidate the correctness of relationships. - A
Component
containing the collection of entities that relate to thisEntity
via the associatedRelationship
type. See theRelationship
documentation for more information.
Functions§
- The “clone behavior” for
RelationshipTarget
. This actually creates an emptyRelationshipTarget
instance with space reserved for the number of targets in the original instance. TheRelationshipTarget
will then be populated with the proper components when the correspondingRelationship
sources of truth are inserted. Cloning the actual entities in the originalRelationshipTarget
would result in duplicates, so we don’t do that!
Type Aliases§
- The iterator type for the source entities in a
RelationshipTarget
collection, as defined in theRelationshipSourceCollection
trait.