Skip to content

Latest commit

 

History

History
66 lines (57 loc) · 16.9 KB

EntityStoreBase.md

File metadata and controls

66 lines (57 loc) · 16.9 KB

EntityStoreBase Class

Store the IComponents and ITag for the Entity's of an EntityStore.

public abstract class EntityStoreBase

Inheritance System.Object 🡒 EntityStoreBase

Derived
EntityStore
RawEntityStore

Remarks

EntityStoreBase is separated as a base from EntityStore as is can be used for
different entity store implementations like the RawEntityStore.

Properties
ArchetypeCount Returns the current number of Archetypes managed by the entity store.
Archetypes Array of Archetype's utilized by the entity store
CapacitySumArchetypes Return the sum of all Archetype capacities.
Count Number of all entities stored in the entity store
EntityCount Obsolete. Renamed to Count.
JobRunner Initialize a default ParallelJobRunner used for QueryJob's.
ShrinkRatioThreshold Shrink ratio threshold: Sum of all Archetype capacities / EntityStore entity count. Default: 10
If the current ratio is > ShrinkRatioThreshold archetype capacities are shrinked.
UniqueEntities Return all UniqueEntity's in the entity store
Methods
Batch(bool) Returns a CreateEntityBatch used to create entities with components and tags added to the batch.
See Example.
FindArchetype(ComponentTypes, Tags) Return the Archetype storing the specified componentTypes and tags.
GetArchetype(ComponentTypes, Tags) Return the Archetype storing the specified componentTypes and tags.
The Archetype is created if not already present.
GetArchetype(Tags) Return the Archetype storing the specified tags.
The Archetype is created if not already present.
GetUniqueEntity(string) Return the entity with a UniqueEntity component and its uid == uid.
See Example.
Query() Create a reusable ArchetypeQuery for the entity store.
See Example.
Query(QueryFilter) Create a reusable ArchetypeQuery with given query filter.
The filter attached to the query can be modified subsequently.
Query<T1,T2,T3,T4,T5>() Create a reusable ArchetypeQuery for the given component types.
See Example.
Query<T1,T2,T3,T4,T5>(QueryFilter) Create a reusable ArchetypeQuery with given query filter.
The filter attached to the query can be modified subsequently.
Query<T1,T2,T3,T4,T5>(Signature<T1,T2,T3,T4,T5>) Create a reusable ArchetypeQuery for given component signature.
Query<T1,T2,T3,T4>() Create a reusable ArchetypeQuery for the given component types.
See Example.
Query<T1,T2,T3,T4>(QueryFilter) Create a reusable ArchetypeQuery with given query filter.
The filter attached to the query can be modified subsequently.
Query<T1,T2,T3,T4>(Signature<T1,T2,T3,T4>) Create a reusable ArchetypeQuery for given component signature.
Query<T1,T2,T3>() Create a reusable ArchetypeQuery for the given component types.
See Example.
Query<T1,T2,T3>(QueryFilter) Create a reusable ArchetypeQuery with given query filter.
The filter attached to the query can be modified subsequently.
Query<T1,T2,T3>(Signature<T1,T2,T3>) Create a reusable ArchetypeQuery for given component signature.
Query<T1,T2>() Create a reusable ArchetypeQuery for the given component types.
See Example.
Query<T1,T2>(QueryFilter) Create a reusable ArchetypeQuery with given query filter.
The filter attached to the query can be modified subsequently.
Query<T1,T2>(Signature<T1,T2>) Create a reusable ArchetypeQuery for given component signature.
Query<T1>() Create a reusable ArchetypeQuery for the given component type.
See Example.
Query<T1>(QueryFilter) Create a reusable ArchetypeQuery with given query filter.
The filter attached to the query can be modified subsequently.
Query<T1>(Signature<T1>) Create a reusable ArchetypeQuery for given component signature.
QueryRelation<T1>() Create a reusable ArchetypeQuery for the given relation type.
QueryRelation<T1>(QueryFilter) Create a reusable ArchetypeQuery with given query filter.
The filter attached to the query can be modified subsequently.
ToString()
UpdateEntityCompIndex(int, int)
Events
OnComponentAdded Add / remove an event handler for ComponentChanged events triggered by:
AddComponent<T>().
OnComponentRemoved Add / remove an event handler for ComponentChanged events triggered by:
RemoveComponent<T>().
OnTagsChanged Add / remove an event handler for TagsChanged events triggered by:
AddTag<TTag>()
AddTags(Tags)
RemoveTag<TTag>()
RemoveTags(Tags).