This is the full API documentation of DefaultEcs.
The DefaultEcs namespace contains types to put in place the Entity Component System pattern.
- AoTHelper
Class
Provides a set of methods to help the generation of generic code for AoT compilation.- RegisterComponent<T>()
Method
Registers the type T so it can freely be used in ComponentAttribute. - RegisterMessage<T>()
Method
Registers the type T so SubscribeAttribute can freely be used on method like the delegate MessageHandler<T>(T) to automatically subscribe when using IPublisherExtension on a World instance. - RegisterUnmanagedComponent<T>()
Method
Registers the unmanaged type T so it can freely be used in ComponentAttribute and by Set<T>(T).
- RegisterComponent<T>()
- ComponentCloner
Class
Exposes a way to clone one Entity components to an other.- ComponentCloner()
Constructor
Initialize a new instance of the ComponentCloner type. - Clone(Entity, Entity)
Method
Clones one Entity components to an other. - OnComponent<T>(T, bool)
Method
Handles the component of type T from the source Entity. - Set<T>(T, bool)
Method
Sets the given component on the copied entity.
- ComponentCloner()
- EntityMap<TKey>
Class
Represents a collection of Entity mapped to a TKey component. Only one Entity can be associated with a given TKey.- Keys
Property
Gets the keys contained in the EntityMap<TKey>. - this[TKey]
Property
Gets the Entity associated with the specified key. - World
Property
Gets the World instance from which current DefaultEcs.IEntityContainer originate. - Complete()
Method
Clears current instance of its entities if it was created with some reactive filter (WhenAdded<T>(), WhenChanged<T>() or WhenRemoved<T>()).
Does nothing if it was created from a static filter.
This method need to be called after current instance content has been processed in a update cycle. - Contains(Entity)
Method
Determines whether the DefaultEcs.IEntityContainer contains a specific Entity. - ContainsKey(TKey)
Method
Determines whether the EntityMap<TKey> contains the specified key. - Dispose()
Method
Releases current EntityMap<TKey> of its subscriptions, stopping it to get modifications on the World's Entity. - TrimExcess()
Method
Resizes inner storage to exactly the number of Entity this DefaultEcs.IEntityContainer contains. - TryGetEntity(TKey, Entity)
Method
Gets the Entity associated with the specified key. - EntityAdded
Event
Occurs when an Entity is added in the current DefaultEcs.IEntityContainer. - EntityRemoved
Event
Occurs when an Entity is removed from the current DefaultEcs.IEntityContainer.
- Keys
- EntityMultiMap<TKey>
Class
Represents a collection of Entity mapped to a TKey component. Multiple Entity can be associated with a given TKey.- Keys
Property
Gets the keys contained in the EntityMultiMap<TKey>. - this[TKey]
Property
Gets the Entity instances associated with the specified key. - World
Property
Gets the World instance from which current DefaultEcs.IEntityContainer originate. - Complete()
Method
Clears current instance of its entities if it was created with some reactive filter (WhenAdded<T>(), WhenChanged<T>() or WhenRemoved<T>()).
Does nothing if it was created from a static filter.
This method need to be called after current instance content has been processed in a update cycle. - Contains(Entity)
Method
Determines whether the DefaultEcs.IEntityContainer contains a specific Entity. - ContainsKey(TKey)
Method
Determines whether the EntityMultiMap<TKey> contains the specified key. - Count(TKey)
Method
Gets the number of Entity in the current EntityMultiMap<TKey> for the given TKey. - Dispose()
Method
Releases current EntitySet of its subscriptions, stopping it to get modifications on the World's Entity. - TrimExcess()
Method
Resizes inner storage to exactly the number of Entity this DefaultEcs.IEntityContainer contains. - TryGetEntities(TKey, ReadOnlySpan<Entity>)
Method
Gets the Entity instances associated with the specified key. - EntityAdded
Event
Occurs when an Entity is added in the current DefaultEcs.IEntityContainer. - EntityRemoved
Event
Occurs when an Entity is removed from the current DefaultEcs.IEntityContainer.
- Keys
- EntityQueryBuilder
Class
Represent an helper object to create rules to retrieve a specific subset of Entity.- AsEnumerable()
Method
Returns an System.Collections.Generic.IEnumerable<> of Entity with the specified rules. - AsMap<TKey>()
Method
Returns an EntityMap<TKey> with the specified rules. - AsMap<TKey>(int)
Method
Returns an EntityMap<TKey> with the specified rules. - AsMap<TKey>(int, IEqualityComparer<TKey>)
Method
Returns an EntityMap<TKey> with the specified rules. - AsMap<TKey>(IEqualityComparer<TKey>)
Method
Returns an EntityMap<TKey> with the specified rules. - AsMultiMap<TKey>()
Method
Returns an EntityMultiMap<TKey> with the specified rules. - AsMultiMap<TKey>(int)
Method
Returns an EntityMultiMap<TKey> with the specified rules. - AsMultiMap<TKey>(int, IEqualityComparer<TKey>)
Method
Returns an EntityMultiMap<TKey> with the specified rules. - AsMultiMap<TKey>(IEqualityComparer<TKey>)
Method
Returns an EntityMultiMap<TKey> with the specified rules. - AsPredicate()
Method
Returns a System.Predicate<> representing the specified rules. - AsSet()
Method
Returns an EntitySet with the specified rules. - AsSortedSet<TComponent>()
Method
Returns an EntitySortedSet<TComponent> with the specified rules. - AsSortedSet<TComponent>(IComparer<TComponent>)
Method
Returns an EntitySortedSet<TComponent> with the specified rules. - Copy()
Method
Copies all the rules of the current EntityQueryBuilder to a new instance. - WhenAdded<T>()
Method
Makes a rule to observe Entity when a component of type T is added. - WhenAddedEither<T>()
Method
Makes a rule to observe Entity when one component of the either group is added. - WhenChanged<T>()
Method
Makes a rule to observe Entity when a component of type T is changed. - WhenChangedEither<T>()
Method
Makes a rule to observe Entity when one component of the either group is changed. - WhenRemoved<T>()
Method
Makes a rule to observe Entity when a component of type T is removed. - WhenRemovedEither<T>()
Method
Makes a rule to observe Entity when one component of the either group is removed. - With<T>()
Method
Makes a rule to observe Entity with a component of type T. - With<T>(ComponentPredicate<T>)
Method
Makes a rule to observe Entity with a component of type T validating the given ComponentPredicate<T>(T). - WithEither<T>()
Method
Makes a rule to obsverve Entity with at least one component of the either group. - Without<T>()
Method
Makes a rule to ignore Entity with a component of type T. - WithoutEither<T>()
Method
Makes a rule to obsverve Entity without at least one component of the either group.
- AsEnumerable()
- EntityQueryBuilder.EitherBuilder
Class
Represents an helper object to create an either group rule to retrieve a specific subset of Entity.- AsEnumerable()
Method
Returns an System.Collections.Generic.IEnumerable<> of Entity with the specified rules. - AsMap<TKey>()
Method
Returns an EntityMap<TKey> with the specified rules. - AsMap<TKey>(int)
Method
Returns an EntityMap<TKey> with the specified rules. - AsMap<TKey>(int, IEqualityComparer<TKey>)
Method
Returns an EntityMap<TKey> with the specified rules. - AsMap<TKey>(IEqualityComparer<TKey>)
Method
Returns an EntityMap<TKey> with the specified rules. - AsMultiMap<TKey>()
Method
Returns an EntityMultiMap<TKey> with the specified rules. - AsMultiMap<TKey>(int)
Method
Returns an EntityMultiMap<TKey> with the specified rules. - AsMultiMap<TKey>(int, IEqualityComparer<TKey>)
Method
Returns an EntityMultiMap<TKey> with the specified rules. - AsMultiMap<TKey>(IEqualityComparer<TKey>)
Method
Returns an EntityMultiMap<TKey> with the specified rules. - AsPredicate()
Method
Returns a System.Predicate<> representing the specified rules. - AsSet()
Method
Returns an EntitySet with the specified rules. - AsSortedSet<TComponent>()
Method
Returns an EntitySortedSet<TComponent> with the specified rules. - AsSortedSet<TComponent>(IComparer<TComponent>)
Method
Returns an EntitySortedSet<TComponent> with the specified rules. - Copy()
Method
Copies all the rules of the current EntityQueryBuilder to a new instance. - Or<T>()
Method
Add the type T to current either group. - WhenAdded<T>()
Method
Makes a rule to observe Entity when a component of type T is added. - WhenAddedEither<T>()
Method
Makes a rule to observe Entity when one component of the either group is added. - WhenChanged<T>()
Method
Makes a rule to observe Entity when a component of type T is changed. - WhenChangedEither<T>()
Method
Makes a rule to observe Entity when one component of the either group is changed. - WhenRemoved<T>()
Method
Makes a rule to observe Entity when a component of type T is removed. - WhenRemovedEither<T>()
Method
Makes a rule to observe Entity when one component of the either group is removed. - With<T>()
Method
Makes a rule to observe Entity with a component of type T. - With<T>(ComponentPredicate<T>)
Method
Makes a rule to observe Entity with a component of type T validating the given ComponentPredicate<T>(T). - WithEither<T>()
Method
Makes a rule to obsverve Entity with at least one component of the either group. - Without<T>()
Method
Makes a rule to ignore Entity with a component of type T. - WithoutEither<T>()
Method
Makes a rule to obsverve Entity without at least one component of the either group.
- AsEnumerable()
- EntityQueryBuilderExtension
Class
Provides set of static methods to create more easily rules on a EntityQueryBuilder instance.- WhenAdded(this EntityQueryBuilder, Type[])
Method
Makes a rule to obsverve Entity when all component of the given types are added. - WhenAddedEither(this EntityQueryBuilder, Type[])
Method
Makes a rule to observe Entity when one component of the given types is added. - WhenChanged(this EntityQueryBuilder, Type[])
Method
Makes a rule to obsverve Entity when all component of the given types are changed. - WhenChangedEither(this EntityQueryBuilder, Type[])
Method
Makes a rule to observe Entity when one component of the given types is changed. - WhenRemoved(this EntityQueryBuilder, Type[])
Method
Makes a rule to obsverve Entity when all component of the given types are removed. - WhenRemovedEither(this EntityQueryBuilder, Type[])
Method
Makes a rule to observe Entity when one component of the given types is removed. - With(this EntityQueryBuilder, Type[])
Method
Makes a rule to obsverve Entity with all component of the given types. - WithEither(this EntityQueryBuilder, Type[])
Method
Makes a rule to obsverve Entity with at least one component of the given types. - Without(this EntityQueryBuilder, Type[])
Method
Makes a rule to ignore Entity with at least one component of the given types. - WithoutEither(this EntityQueryBuilder, Type[])
Method
Makes a rule to obsverve Entity without at least one component of the given types.
- WhenAdded(this EntityQueryBuilder, Type[])
- EntitySet
Class
Represents a sub-selection of Entity instances from a World.- Count
Property
Gets the number of Entity in the current EntitySet. - World
Property
Gets the World instance from which current DefaultEcs.IEntityContainer originate. - Complete()
Method
Clears current instance of its entities if it was created with some reactive filter (WhenAdded<T>(), WhenChanged<T>() or WhenRemoved<T>()).
Does nothing if it was created from a static filter.
This method need to be called after current instance content has been processed in a update cycle. - Contains(Entity)
Method
Determines whether the DefaultEcs.IEntityContainer contains a specific Entity. - Dispose()
Method
Releases current EntitySet of its subscriptions, stopping it to get modifications on the World's Entity. - GetEntities()
Method
Gets the Entity contained in the current EntitySet. - TrimExcess()
Method
Resizes inner storage to exactly the number of Entity this DefaultEcs.IEntityContainer contains. - EntityAdded
Event
Occurs when an Entity is added in the current DefaultEcs.IEntityContainer. - EntityRemoved
Event
Occurs when an Entity is removed from the current DefaultEcs.IEntityContainer.
- Count
- EntitySortedSet<TComponent>
Class
Represents a sub-selection of Entity instances from a World sorted by a specific component.- Count
Property
Gets the number of Entity in the current EntitySortedSet<TComponent>. - World
Property
Gets the World instance from which current DefaultEcs.IEntityContainer originate. - Complete()
Method
Clears current instance of its entities if it was created with some reactive filter (WhenAdded<T>(), WhenChanged<T>() or WhenRemoved<T>()).
Does nothing if it was created from a static filter.
This method need to be called after current instance content has been processed in a update cycle. - Contains(Entity)
Method
Determines whether the DefaultEcs.IEntityContainer contains a specific Entity. - Dispose()
Method
Releases current EntitySortedSet<TComponent> of its subscriptions, stopping it to get modifications on the World's Entity. - GetEntities()
Method
Gets the Entity contained in the current EntitySortedSet<TComponent>. - TrimExcess()
Method
Resizes inner storage to exactly the number of Entity this DefaultEcs.IEntityContainer contains. - EntityAdded
Event
Occurs when an Entity is added in the current DefaultEcs.IEntityContainer. - EntityRemoved
Event
Occurs when an Entity is removed from the current DefaultEcs.IEntityContainer.
- Count
- IPublisherExtension
Class
Provides set of static methods to automatically subscribe MessageHandler<T>(T) methods marked with the SubscribeAttribute on a IPublisher instance.- Subscribe(this IPublisher, Type)
Method
Subscribes automatically methods of a Type marked with the SubscribeAttribute on an IPublisher instance. - Subscribe<T>(this IPublisher)
Method
Subscribes automatically methods of a Type marked with the SubscribeAttribute on an IPublisher instance. - Subscribe<T>(this IPublisher, T)
Method
Subscribes automatically methods of an instance and its Type marked with the SubscribeAttribute on an IPublisher instance.
- Subscribe(this IPublisher, Type)
- SubscribeAttribute
Class
Specifies that the method should be automatically subscribed when its parent type or instance is called with IPublisherExtension.
The decorated method should be of the type MessageHandler<T>(T). - World
Class
Represents a item used to create and manage Entity objects.- World()
Constructor
Initializes a new instance of the World class. - World(int)
Constructor
Initializes a new instance of the World class. - MaxCapacity
Property
Gets the maximum number of Entity this World can handle. - CreateEntity()
Method
Creates a new instance of the Entity struct.
This method is not thread safe. - Dispose()
Method
Cleans up all the components of existing Entity.
The current World, all Entity and EntitySet created from this instance, should not be used again after calling this method. - Get<T>()
Method
Gets the component of type T on the current World. - GetAll<T>()
Method
Gets all the component of a given type T. - GetComponents<T>()
Method
Gets an Components<T> to get a fast access to the component of type T of this World instance Entity. - GetDisabledEntities()
Method
Gets an EntityQueryBuilder to create a subset of disabled Entity of the current World. - GetEntities()
Method
Gets an EntityQueryBuilder to create a subset of Entity of the current World. - GetEnumerator()
Method
Returns an enumerator that iterates through the Entity of the current World instance. - GetMaxCapacity<T>()
Method
Gets the maximum number of T components this World can create. - Has<T>()
Method
Returns whether the current World has a component of type T.
It has nothing to do whether or not the current World instance has an Entity with a component of type T. - Optimize()
Method
Sorts current instance inner storage so accessing Entity and their components from EntitySet and EntityMultiMap<TKey> always move forward in memory.
This method is not thread safe. - Optimize(IParallelRunner)
Method
Sorts current instance inner storage so accessing Entity and their components from EntitySet and EntityMultiMap<TKey> always move forward in memory.
This method is not thread safe. - Optimize(IParallelRunner, Action)
Method
Sorts current instance inner storage so accessing Entity and their components from EntitySet and EntityMultiMap<TKey> always move forward in memory.
This method will return once mainAction is executed even if the optimization process has not finished.
This method is not thread safe. - Publish<T>(T)
Method
Publishes a T object. - ReadAllComponentTypes(IComponentTypeReader)
Method
Calls on reader with all the maximum number of component of the current World.
This method is primiraly used for serialization purpose and should not be called in game logic. - Remove<T>()
Method
Removes the component of type T on the current World.
This method is not thread safe. - Set<T>()
Method
Sets the value of the component of type T to its default value on the current World.
This method is not thread safe. - Set<T>(T)
Method
Sets the value of the component of type T on the current World.
This method is not thread safe. - SetMaxCapacity<T>(int)
Method
Sets up the current World to handle component of type T with a different maximum count than MaxCapacity.
If the type of component is already handled by the current World, does nothing.
This method is not thread safe. - Subscribe<T>(MessageHandler<T>)
Method
Subscribes an MessageHandler<T>(T) to be called back when a T object is published. - SubscribeComponentAdded<T>(ComponentAddedHandler<T>)
Method
Subscribes a ComponentAddedHandler<T>(Entity, T) on the current World to be called when a component of type T is added. - SubscribeComponentChanged<T>(ComponentChangedHandler<T>)
Method
Subscribes a ComponentChangedHandler<T>(Entity, T, T) on the current World to be called when a component of type T is changed. - SubscribeComponentDisabled<T>(ComponentDisabledHandler<T>)
Method
Subscribes a ComponentDisabledHandler<T>(Entity, T) on the current World to be called when a component of type T is disabled. - SubscribeComponentEnabled<T>(ComponentEnabledHandler<T>)
Method
Subscribes a ComponentEnabledHandler<T>(Entity, T) on the current World to be called when a component of type T is enabled. - SubscribeComponentRemoved<T>(ComponentRemovedHandler<T>)
Method
Subscribes an ComponentRemovedHandler<T>(Entity, T) on the current World to be called when a component of type T is removed. - SubscribeEntityCreated(EntityCreatedHandler)
Method
Subscribes an EntityCreatedHandler(Entity) on the current World to be called when an Entity is created. - SubscribeEntityDisabled(EntityDisabledHandler)
Method
Subscribes an EntityDisabledHandler(Entity) on the current World to be called when an Entity is disabled. - SubscribeEntityDisposed(EntityDisposedHandler)
Method
Subscribes an EntityDisposedHandler(Entity) on the current World to be called when an Entity is disposed. - SubscribeEntityEnabled(EntityEnabledHandler)
Method
Subscribes an EntityEnabledHandler(Entity) on the current World to be called when an Entity is enabled. - SubscribeWorldDisposed(WorldDisposedHandler)
Method
Subscribes an WorldDisposedHandler(World) on the current World to be called when current instance is disposed. - ToString()
Method
Returns a string representation of this instance. - TrimExcess()
Method
Resizes all inner storage to exactly the number of Entity and components this World contains.
This method is not thread safe. - TrimExcess<T>()
Method
Resizes inner storage to exactly the number of T components this World contains.
This method is not thread safe. - System.Collections.Generic.IEnumerable<DefaultEcs.Entity>.GetEnumerator()
Explicit Interface Implementation
Returns an enumerator that iterates through the Entity of the current World instance. - System.Collections.IEnumerable.GetEnumerator()
Explicit Interface Implementation
Returns an enumerator that iterates through the Entity of the current World instance.
- World()
- Components<T>
Struct
Provides a fast access to the components of type T.
Note that all entity modification operations are not safe (anything different than a simple Get<T>()) and may invalidate the Components<T>.- this[Entity]
Property
Gets the component of type T on the provided Entity.
- this[Entity]
- Entity
Struct
Represents an item in the World.
Only use Entity generated from the CreateEntity() method.- IsAlive
Property
Gets whether the current Entity is alive or not. - World
Property
Gets the World instance from which current Entity originate. - CopyTo(World)
Method
Creates a copy of current Entity with all of its components in the given World.
This method is not thread safe. - CopyTo(World, ComponentCloner)
Method
Creates a copy of current Entity with all of its components in the given World using the given ComponentCloner.
This method is not thread safe. - Disable()
Method
Disables the current Entity so it does not appear in EntitySet.
This method is not thread safe. - Disable<T>()
Method
Disables the current Entity component of type T so it does not appear in EntitySet.
Does nothing if current Entity does not have a component of type T.
This method is not thread safe. - Dispose()
Method
Clean the current Entity of all its components.
The current Entity should not be used again after calling this method and IsAlive will return false. - Enable()
Method
Enables the current Entity so it can appear in EntitySet.
This method is not thread safe. - Enable<T>()
Method
Enables the current Entity component of type T so it can appear in EntitySet.
Does nothing if current Entity does not have a component of type T.
This method is not thread safe. - Equals(Entity)
Method
Indicates whether the current object is equal to another object of the same type. - Equals(object)
Method
Indicates whether this instance and a specified object are equal. - Get<T>()
Method
Gets the component of type T on the current Entity. - GetHashCode()
Method
Returns the hash code for this instance. - Has<T>()
Method
Returns whether the current Entity has a component of type T. - IsEnabled()
Method
Gets whether the current Entity is enabled or not. - IsEnabled<T>()
Method
Gets whether the current Entity component of type T is enabled or not. - NotifyChanged<T>()
Method
Notifies the value of the component of type T has changed.
This method is not thread safe. - ReadAllComponents(IComponentReader)
Method
Calls on reader with all the component of the current Entity.
This method is primiraly used for serialization purpose and should not be called in game logic. - Remove<T>()
Method
Removes the component of type T on the current Entity.
This method is not thread safe. - Set<T>()
Method
Sets the value of the component of type T to its default value on the current Entity.
This method is not thread safe. - Set<T>(T)
Method
Sets the value of the component of type T on the current Entity.
This method is not thread safe. - SetSameAs<T>(Entity)
Method
Sets the value of the component of type T on the current Entity to the same instance of an other Entity.
This method is not thread safe. - SetSameAsWorld<T>()
Method
Sets the value of the component of type T on the current Entity to the same instance of an other Entity.
This method is not thread safe. - ToString()
Method
Returns a string representation of this instance. - operator ==(Entity, Entity)
Operator
Determines whether two specified entities are the same. - operator !=(Entity, Entity)
Operator
Determines whether two specified entities are not the same.
- IsAlive
- EntityMap<TKey>.KeyEnumerable
Struct
Allows to enumerate the TKey of a EntityMap<TKey>.- GetEnumerator()
Method
Returns an enumerator that iterates through the collection. - System.Collections.Generic.IEnumerable<TKey>.GetEnumerator()
Explicit Interface Implementation
Returns an enumerator that iterates through the collection. - System.Collections.IEnumerable.GetEnumerator()
Explicit Interface Implementation
Returns an enumerator that iterates through the collection.
- GetEnumerator()
- EntityMap<TKey>.KeyEnumerator
Struct
Enumerates the TKey of a EntityMap<TKey>.- Current
Property
Gets the TKey at the current position of the enumerator. - Dispose()
Method
Releases all resources used by the KeyEnumerator. - MoveNext()
Method
Advances the enumerator to the next TKey of the EntityMap<TKey>. - System.Collections.IEnumerator.Current
Explicit Interface Implementation
Gets the TKey at the current position of the enumerator. - System.Collections.IEnumerator.Reset()
Explicit Interface Implementation
Sets the enumerator to its initial position, which is before the first element in the collection.
- Current
- EntityMultiMap<TKey>.KeyEnumerable
Struct
Allows to enumerate the TKey of a EntityMultiMap<TKey>.- GetEnumerator()
Method
Returns an enumerator that iterates through the collection. - System.Collections.Generic.IEnumerable<TKey>.GetEnumerator()
Explicit Interface Implementation
Returns an enumerator that iterates through the collection. - System.Collections.IEnumerable.GetEnumerator()
Explicit Interface Implementation
Returns an enumerator that iterates through the collection.
- GetEnumerator()
- EntityMultiMap<TKey>.KeyEnumerator
Struct
Enumerates the TKey of a EntityMultiMap<TKey>.- Current
Property
Gets the TKey at the current position of the enumerator. - Dispose()
Method
Releases all resources used by the KeyEnumerator. - MoveNext()
Method
Advances the enumerator to the next TKey of the EntityMultiMap<TKey>. - System.Collections.IEnumerator.Current
Explicit Interface Implementation
Gets the TKey at the current position of the enumerator. - System.Collections.IEnumerator.Reset()
Explicit Interface Implementation
Sets the enumerator to its initial position, which is before the first element in the collection.
- Current
- World.Enumerator
Struct
Enumerates the Entity of a World.- Current
Property
Gets the Entity at the current position of the enumerator. - Dispose()
Method
Releases all resources used by the Enumerator. - MoveNext()
Method
Advances the enumerator to the next Entity of the World. - Reset()
Method
Sets the enumerator to its initial position, which is before the first Entity in the collection. - System.Collections.IEnumerator.Current
Explicit Interface Implementation
Gets the Entity at the current position of the enumerator.
- Current
- IPublisher
Interface
Exposes methods to subscribe to MessageHandler<T>(T) and publish message to callback those subscriptions.- Publish<T>(T)
Method
Publishes a T object. - Subscribe<T>(MessageHandler<T>)
Method
Subscribes an MessageHandler<T>(T) to be called back when a T object is published.
- Publish<T>(T)
- ComponentAddedHandler<T>(Entity, T)
Delegate
Represents the method that will called when a component of type T is added on an Entity. - ComponentChangedHandler<T>(Entity, T, T)
Delegate
Represents the method that will called when a component of type T is removed from an Entity. - ComponentDisabledHandler<T>(Entity, T)
Delegate
Represents the method that will called when a component of type T is disabled on an Entity. - ComponentEnabledHandler<T>(Entity, T)
Delegate
Represents the method that will called when a component of type T is enabled on an Entity. - ComponentPredicate<T>(T)
Delegate
Represents the method that defines a set of criteria and determines whether the specified component meets those criteria. - ComponentRemovedHandler<T>(Entity, T)
Delegate
Represents the method that will called when a component of type T is removed from an Entity. - EntityAddedHandler(Entity)
Delegate
Represents the method that will called when an Entity is added to a container. - EntityCreatedHandler(Entity)
Delegate
Represents the method that will called when an Entity is created. - EntityDisabledHandler(Entity)
Delegate
Represents the method that will called when an Entity is disabled. - EntityDisposedHandler(Entity)
Delegate
Represents the method that will called when an Entity is disposed. - EntityEnabledHandler(Entity)
Delegate
Represents the method that will called when an Entity is enabled. - EntityRemovedHandler(Entity)
Delegate
Represents the method that will called when an Entity is removed from a container. - MessageHandler<T>(T)
Delegate
Encapsulates a method that has a single in parameter and does not return a value used for Subscribe<T>(MessageHandler<T>) method. - WorldDisposedHandler(World)
Delegate
Represents the method that will called when a World is created.
The DefaultEcs.Command namespace contains types used in the recording and deferred execution of modifications on entities.
- EntityCommandRecorder
Class
Represents a buffer of structural modifications to apply on Entity to record as postoned commands.- EntityCommandRecorder()
Constructor
Creates a default sized EntityCommandRecorder of 1ko which can grow as needed. - EntityCommandRecorder(int)
Constructor
Creates a fixed sized EntityCommandRecorder. - EntityCommandRecorder(int, int)
Constructor
Creates an EntityCommandRecorder with a custom default size which can grow to a maximum capacity. - Capacity
Property
Gets current capacity of the current instance. - MaxCapacity
Property
Gets the maximum capacity the current instance can grow to. - Size
Property
Gets the size taken by recorded commands in current instance. - Clear()
Method
Clears all recorded commands. - Dispose()
Method
Releases inner unmanaged resources. - Execute()
Method
Executes all recorded commands and clears those commands. - Record(Entity)
Method
Gives an EntityRecord to record action on the given Entity.
This command takes 9 bytes. - Record(World)
Method
Gives an WorldRecord to record action on the given World.
- EntityCommandRecorder()
- EntityRecord
Struct
Represents an Entity on which to create commands to record in a EntityCommandRecorder.- CopyTo(World)
Method
Creates a copy of current EntityRecord with all of its components in the given World. - CopyTo(World, ComponentCloner)
Method
Creates a copy of current EntityRecord with all of its components in the given World using the given ComponentCloner. - Disable()
Method
Disables the corresponding Entity so it does not appear in EntitySet.
This command takes 5 bytes. - Disable<T>()
Method
Disables the corresponding Entity component of type T so it does not appear in EntitySet.
This command takes 9 bytes. - Dispose()
Method
Clean the corresponding Entity of all its components.
The current EntityRecord should not be used again after calling this method.
This command takes 5 bytes. - Enable()
Method
Enables the corresponding Entity so it can appear in EntitySet.
This command takes 5 bytes. - Enable<T>()
Method
Enables the corresponding Entity component of type T so it can appear in EntitySet.
Does nothing if corresponding Entity does not have a component of type T.
This command takes 9 bytes. - NotifyChanged<T>()
Method
Notifies the value of the component of type T has changed on the corresponding Entity.
This command takes 9 bytes. - Remove<T>()
Method
Removes the component of type T on the corresponding Entity.
This command takes 9 bytes. - Set<T>()
Method
Sets the value of the component of type T to its default value on the corresponding Entity.
For a blittable component, this command takes 9 bytes + the size of the component.
For non blittable component, this command takes 13 bytes and may cause some allocation because of boxing on struct component type. - Set<T>(T)
Method
Sets the value of the component of type T on the corresponding Entity.
For a blittable component, this command takes 9 bytes + the size of the component.
For non blittable component, this command takes 13 bytes and may cause some allocation because of boxing on struct component type. - SetSameAs<T>(EntityRecord)
Method
Sets the value of the component of type T on the corresponding Entity to the same instance of an other EntityRecord.
This command takes 13 bytes. - SetSameAsWorld<T>()
Method
Sets the value of the component of type T on the corresponding Entity to the same instance of its World.
This command takes 9 bytes.
- CopyTo(World)
- WorldRecord
Struct
Represents a World on which to create commands to record in a EntityCommandRecorder.- CreateEntity()
Method
Records the creation of an Entity on a World and returns an EntityRecord to record action on it.
This command takes 9 bytes. - Remove<T>()
Method
Removes the component of type T on the corresponding World.
This command takes 7 bytes. - Set<T>()
Method
Sets the value of the component of type T to its default value on the corresponding World.
For a blittable component, this command takes 7 bytes + the size of the component.
For non blittable component, this command takes 11 bytes and may cause some allocation because of boxing on struct component type. - Set<T>(T)
Method
Sets the value of the component of type T on the corresponding World.
For a blittable component, this command takes 7 bytes + the size of the component.
For non blittable component, this command takes 11 bytes and may cause some allocation because of boxing on struct component type.
- CreateEntity()
The DefaultEcs.Resource namespace contains types used in the loading of unmanaged resources needed as components.
- AResourceManager<TInfo,TResource>
Class
Base type used to load resources of type TResource using info of type TInfo.
TInfo is used as key if the same resource is requested on multiple Entity to only load the TResource resource once.
If no Entity contains the ManagedResource<TInfo,TResource> component identifying the resource anymore, the TResource instance is then unloaded automatically.
By default, if TResource is System.IDisposable, Unload(TInfo, TResource) will call the System.IDisposable.Dispose method of the resource.- AResourceManager()
Constructor
Creates an instance of type AResourceManager<TInfo,TResource>. - Resources
Property
Gets all the TResource loaded by the current instance and their corresponding TInfo. - Dispose()
Method
Unloads all loaded resources. - Load(TInfo)
Method
Loads a resource of type TResource using the provided TInfo parameter. - Manage(World)
Method
Sets up current AResourceManager<TInfo,TResource> instance to react to ManagedResource<TInfo,TResource> components on Entity instances of the provided World.
Once no Entity contains a ManagedResource<TInfo,TResource> component anymore, the shared TResource resource is disposed automatically. - OnResourceLoaded(Entity, TInfo, TResource)
Method
Called when a resource is loaded from a ManagedResource<TInfo,TResource> component of an Entity. - Unload(TInfo, TResource)
Method
Unloads a resource once it is no longer referenced by a ManagedResource<TInfo,TResource>.
By default if TResource is System.IDisposable, calls the System.IDisposable.Dispose method.
- AResourceManager()
- ManagedResource<TResource>
Class
Provides static methods for creating ManagedResource<TInfo,TResource> object.- Create<TInfo>(TInfo)
Method
Create a ManagedResource<TInfo,TResource> object - Create<TInfo>(TInfo[])
Method
Create a ManagedResource<TInfo,TResource> object with multiple infos.
- Create<TInfo>(TInfo)
- AResourceManager<TInfo,TResource>.ResourceEnumerable
Struct
Allows to enumerate the resources of a AResourceManager<TInfo,TResource>.- GetEnumerator()
Method
Returns an enumerator that iterates through the collection. - System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TInfo,TResource>>.GetEnumerator()
Explicit Interface Implementation
Returns an enumerator that iterates through the collection. - System.Collections.IEnumerable.GetEnumerator()
Explicit Interface Implementation
Returns an enumerator that iterates through the collection.
- GetEnumerator()
- AResourceManager<TInfo,TResource>.ResourceEnumerator
Struct
Enumerates the resources of a AResourceManager<TInfo,TResource>.- Current
Property
Gets the resource at the current position of the enumerator. - Dispose()
Method
Releases all resources used by the ResourceEnumerator. - MoveNext()
Method
Advances the enumerator to the next resource of the AResourceManager<TInfo,TResource>. - System.Collections.IEnumerator.Current
Explicit Interface Implementation
Gets the resource at the current position of the enumerator. - System.Collections.IEnumerator.Reset()
Explicit Interface Implementation
Sets the enumerator to its initial position, which is before the first element in the collection.
- Current
- ManagedResource<TInfo,TResource>
Struct
Component type used to load managed resource with a AResourceManager<TInfo,TResource>.- ManagedResource(TInfo)
Constructor
Creates a component of type ManagedResource<TInfo,TResource> used to load a resource of type TResource. - Info
Field
Gets the info about the resource to load.
- ManagedResource(TInfo)
The DefaultEcs.Serialization namespace contains types used to save and load DefaultEcs objects.
- BinarySerializationContext
Class
Represents a context used by the BinarySerializer to convert types during serialization and deserialization operations.
The context marshalling will not be applied on members of unmanaged type as BinarySerializer just past their memory location with no transformation.- BinarySerializationContext()
Constructor
Initializes a new instance of the BinarySerializationContext class. - Dispose()
Method
Releases inner resources. - Marshal<TIn,TOut>(Func<TIn,TOut>)
Method
Adds a convertion between the type TIn and the type TOut during a serialization operation. - Unmarshal<TIn,TOut>(Func<TIn,TOut>)
Method
Adds a convertion between the type TIn and the type TOut during a deserialization operation.
- BinarySerializationContext()
- BinarySerializer
Class
Provides a basic implementation of the ISerializer interface using a binary format.- BinarySerializer()
Constructor
Initializes a new instance of the BinarySerializer class. - BinarySerializer(BinarySerializationContext)
Constructor
Initializes a new instance of the BinarySerializer class. - BinarySerializer(Predicate<Type>)
Constructor
Initializes a new instance of the BinarySerializer class. - BinarySerializer(Predicate<Type>, BinarySerializationContext)
Constructor
Initializes a new instance of the BinarySerializer class. - Deserialize(Stream)
Method
Deserializes a World instance from the given System.IO.Stream. - Deserialize(Stream, World)
Method
Deserializes Entity instances with their components from the given System.IO.Stream into the given World. - Read<T>(Stream)
Method
Read an object of type T from the given stream. - Read<T>(Stream, BinarySerializationContext)
Method
Read an object of type T from the given stream. - Serialize(Stream, World)
Method
Serializes the given World into the provided System.IO.Stream. - Serialize(Stream, IEnumerable<Entity>)
Method
Serializes the given Entity instances with their components into the provided System.IO.Stream. - Write<T>(Stream, T)
Method
Writes an object of type T on the given stream. - Write<T>(Stream, T, BinarySerializationContext)
Method
Writes an object of type T on the given stream.
- BinarySerializer()
- ISerializerExtension
Class
Provides extension methods to the ISerializer type.- Serialize(this ISerializer, Stream, Entity[])
Method
Serializes the given Entity instances with their components into the provided System.IO.Stream.
- Serialize(this ISerializer, Stream, Entity[])
- TextSerializationContext
Class
Represents a context used by the TextSerializer to convert types during serialization and deserialization operations.- TextSerializationContext()
Constructor
Initializes a new instance of the TextSerializationContext class. - Dispose()
Method
Releases inner resources. - Marshal<TIn,TOut>(Func<TIn,TOut>)
Method
Adds a convertion between the type TIn and the type TOut during a serialization operation. - Unmarshal<TIn,TOut>(Func<TIn,TOut>)
Method
Adds a convertion between the type TIn and the type TOut during a deserialization operation.
- TextSerializationContext()
- TextSerializer
Class
Provides a basic implementation of the ISerializer interface using a text readable format.- TextSerializer()
Constructor
Initializes a new instance of the TextSerializer class. - TextSerializer(TextSerializationContext)
Constructor
Initializes a new instance of the TextSerializer class. - TextSerializer(Predicate<Type>)
Constructor
Initializes a new instance of the TextSerializer class. - TextSerializer(Predicate<Type>, TextSerializationContext)
Constructor
Initializes a new instance of the TextSerializer class. - Deserialize(Stream)
Method
Deserializes a World instance from the given System.IO.Stream. - Deserialize(Stream, World)
Method
Deserializes Entity instances with their components from the given System.IO.Stream into the given World. - Read<T>(Stream)
Method
Read an object of type T from the given stream. - Read<T>(Stream, TextSerializationContext)
Method
Read an object of type T from the given stream. - Serialize(Stream, World)
Method
Serializes the given World into the provided System.IO.Stream. - Serialize(Stream, IEnumerable<Entity>)
Method
Serializes the given Entity instances with their components into the provided System.IO.Stream. - Write<T>(Stream, T)
Method
Writes an object of type T on the given stream. - Write<T>(Stream, T, TextSerializationContext)
Method
Writes an object of type T on the given stream.
- TextSerializer()
- IComponentReader
Interface
Exposes a method to be called back when getting an Entity components, primarly used for serialization purpose.- OnRead<T>(T, Entity)
Method
Processes the component of type T.
- OnRead<T>(T, Entity)
- IComponentTypeReader
Interface
Exposes a method to be called back when getting the maximum number of component of a World, primarly used for serialization purpose.- OnRead<T>(int)
Method
Processes the maximum number of component of type T.
- OnRead<T>(int)
- ISerializer
Interface
Provides a set of methods to save and load DefaultEcs objects.- Deserialize(Stream)
Method
Deserializes a World instance from the given System.IO.Stream. - Deserialize(Stream, World)
Method
Deserializes Entity instances with their components from the given System.IO.Stream into the given World. - Serialize(Stream, World)
Method
Serializes the given World into the provided System.IO.Stream. - Serialize(Stream, IEnumerable<Entity>)
Method
Serializes the given Entity instances with their components into the provided System.IO.Stream.
- Deserialize(Stream)
The DefaultEcs.System namespace contains types to define workflows of modification on entities and components.
- AComponentSystem<TState,TComponent>
Class
Represents a base class to process updates on a given World instance to all its components of type TComponent.- AComponentSystem(World)
Constructor
Initialise a new instance of the AComponentSystem<TState,TComponent> class with the given World. - AComponentSystem(World, IParallelRunner)
Constructor
Initialise a new instance of the AComponentSystem<TState,TComponent> class with the given World and IParallelRunner. - AComponentSystem(World, IParallelRunner, int)
Constructor
Initialise a new instance of the AComponentSystem<TState,TComponent> class with the given World and IParallelRunner. - IsEnabled
Property
Gets or sets whether the current AComponentSystem<TState,TComponent> instance should update or not. - World
Property
Gets the World instance on which this system operates. - Dispose()
Method
Does nothing. - PostUpdate(TState)
Method
Performs a post-update treatment. - PreUpdate(TState)
Method
Performs a pre-update treatment. - Update(TState)
Method
Updates the system once.
Does nothing if IsEnabled is false or if there is no component of type TComponent in the World. - Update(TState, Span<TComponent>)
Method
Update the given TComponent once. - Update(TState, TComponent)
Method
Update the given TComponent once.
- AComponentSystem(World)
- ActionSystem<T>
Class
Represents a class to set up easily a custom action as a system update.- ActionSystem(Action<T>)
Constructor
Initialises a new instance of the ActionSystem<T> class with the given System.Action<>. - IsEnabled
Property
Gets or sets whether the current ISystem<T> instance should update or not. - Dispose()
Method
Does nothing. - Update(T)
Method
Updates the system once.
Does nothing if IsEnabled is false.
- ActionSystem(Action<T>)
- AEntityMultiMapSystem<TState,TKey>
Class
Represents a base class to process updates on a given EntityMultiMap<TKey> instance.
Only Get<T>() operations on already present component type are safe.
Any other operation maybe change the inner EntityMultiMap<TKey> and should be done either by setting "useBuffer" of the available constructors to true or using an EntityCommandRecorder.- AEntityMultiMapSystem(EntityMultiMap<TKey>, bool)
Constructor
Initialise a new instance of the AEntityMultiMapSystem<TState,TKey> class with the given EntityMultiMap<TKey>. - AEntityMultiMapSystem(EntityMultiMap<TKey>, IParallelRunner, int)
Constructor
Initialise a new instance of the AEntityMultiMapSystem<TState,TKey> class with the given EntityMultiMap<TKey> and IParallelRunner. - AEntityMultiMapSystem(World, bool)
Constructor
Initialise a new instance of the AEntityMultiMapSystem<TState,TKey> class with the given World.
To create the inner EntityMultiMap<TKey>, WithAttribute and WithoutAttribute attributes will be used. - AEntityMultiMapSystem(World, IParallelRunner, int)
Constructor
Initialise a new instance of the AEntityMultiMapSystem<TState,TKey> class with the given World.
To create the inner EntityMultiMap<TKey>, WithAttribute and WithoutAttribute attributes will be used. - AEntityMultiMapSystem(World, Func<object,World,EntityMultiMap<TKey>>, bool)
Constructor
Initialise a new instance of the AEntityMultiMapSystem<TState,TKey> class with the given World.
To create the inner EntityMultiMap<TKey>, WithAttribute and WithoutAttribute attributes will be used. - AEntityMultiMapSystem(World, Func<object,World,EntityMultiMap<TKey>>, IParallelRunner, int)
Constructor
Initialise a new instance of the AEntityMultiMapSystem<TState,TKey> class with the given World and factory.
The current instance will be passed as the first parameter of the factory. - IsEnabled
Property
Gets or sets whether the current AEntityMultiMapSystem<TState,TKey> instance should update or not. - MultiMap
Property
Gets the EntityMultiMap<TKey> instance on which this system operates. - World
Property
Gets the World instance on which this system operates. - Dispose()
Method
Disposes of the inner EntityMultiMap<TKey> instance. - GetKeys()
Method
Gets all the TKey of the inner EntityMultiMap<TKey> which Entity instances will be updated. - PostUpdate(TState)
Method
Performs a post-update treatment. - PostUpdate(TState, TKey)
Method
Performs a post-update per TKey treatment. - PreUpdate(TState)
Method
Performs a pre-update treatment. - PreUpdate(TState, TKey)
Method
Performs a pre-update per TKey treatment. - Update(TState)
Method
Updates the system once.
Does nothing if IsEnabled is false or if the inner EntityMultiMap<TKey> is empty. - Update(TState, TKey, Entity)
Method
Update the given Entity instance once. - Update(TState, TKey, ReadOnlySpan<Entity>)
Method
Update the given Entity instances once.
- AEntityMultiMapSystem(EntityMultiMap<TKey>, bool)
- AEntitySetSystem<T>
Class
Represents a base class to process updates on a given EntitySet instance.
Only Get<T>() operations on already present component type are safe.
Any other operation maybe change the inner EntitySet and should be done either by using setting "useBuffer" of the available constructors to true or using an EntityCommandRecorder.- AEntitySetSystem(EntitySet, bool)
Constructor
Initialise a new instance of the AEntitySetSystem<T> class with the given EntitySet. - AEntitySetSystem(EntitySet, IParallelRunner, int)
Constructor
Initialise a new instance of the AEntitySetSystem<T> class with the given EntitySet and IParallelRunner. - AEntitySetSystem(World, bool)
Constructor
Initialise a new instance of the AEntitySetSystem<T> class with the given World.
To create the inner EntitySet, WithAttribute and WithoutAttribute attributes will be used. - AEntitySetSystem(World, IParallelRunner, int)
Constructor
Initialise a new instance of the AEntitySetSystem<T> class with the given World.
To create the inner EntitySet, WithAttribute and WithoutAttribute attributes will be used. - AEntitySetSystem(World, Func<object,World,EntitySet>, bool)
Constructor
Initialise a new instance of the AEntitySetSystem<T> class with the given World.
To create the inner EntitySet, WithAttribute and WithoutAttribute attributes will be used. - AEntitySetSystem(World, Func<object,World,EntitySet>, IParallelRunner, int)
Constructor
Initialise a new instance of the AEntitySetSystem<T> class with the given World and factory.
The current instance will be passed as the first parameter of the factory. - IsEnabled
Property
Gets or sets whether the current AEntitySetSystem<T> instance should update or not. - Set
Property
Gets the EntitySet instance on which this system operates. - World
Property
Gets the World instance on which this system operates. - Dispose()
Method
Disposes of the inner EntitySet instance. - PostUpdate(T)
Method
Performs a post-update treatment. - PreUpdate(T)
Method
Performs a pre-update treatment. - Update(T)
Method
Updates the system once.
Does nothing if IsEnabled is false or if the inner EntitySet is empty. - Update(T, Entity)
Method
Update the given Entity instance once. - Update(T, ReadOnlySpan<Entity>)
Method
Update the given Entity instances once.
- AEntitySetSystem(EntitySet, bool)
- AEntitySortedSetSystem<TState,TComponent>
Class
Represents a base class to process updates on a given EntitySortedSet<TComponent> instance.
Only Get<T>() operations on already present component type are safe.
Any other operation maybe change the inner EntitySortedSet<TComponent> and should be done either by using setting "useBuffer" of the available constructors to true or using an EntityCommandRecorder.- AEntitySortedSetSystem(EntitySortedSet<TComponent>, bool)
Constructor
Initialise a new instance of the AEntitySortedSetSystem<TState,TComponent> class with the given EntitySortedSet<TComponent>. - AEntitySortedSetSystem(World, bool)
Constructor
Initialise a new instance of the AEntitySortedSetSystem<TState,TComponent> class with the given World and factory.
To create the inner EntitySet, WithAttribute and WithoutAttribute attributes will be used. - AEntitySortedSetSystem(World, Func<object,World,EntitySortedSet<TComponent>>, bool)
Constructor
Initialise a new instance of the AEntitySortedSetSystem<TState,TComponent> class with the given World and factory.
To create the inner EntitySet, WithAttribute and WithoutAttribute attributes will be used. - IsEnabled
Property
Gets or sets whether the current AEntitySortedSetSystem<TState,TComponent> instance should update or not. - SortedSet
Property
Gets the EntitySortedSet<TComponent> instance on which this system operates. - World
Property
Gets the World instance on which this system operates. - Dispose()
Method
Disposes of the inner EntitySortedSet<TComponent> instance. - PostUpdate(TState)
Method
Performs a post-update treatment. - PreUpdate(TState)
Method
Performs a pre-update treatment. - Update(TState)
Method
Updates the system once.
Does nothing if IsEnabled is false or if the inner EntitySortedSet<TComponent> is empty. - Update(TState, Entity)
Method
Update the given Entity instance once. - Update(TState, ReadOnlySpan<Entity>)
Method
Update the given Entity instances once.
- AEntitySortedSetSystem(EntitySortedSet<TComponent>, bool)
- ComponentAttribute
Class
Represents the base attribute to declare how to build the inner EntitySet of AEntitySetSystem<T> when giving a World instance.
Do not use this attribute, prefer WithAttribute and WithoutAttribute instead.- ComponentAttribute(ComponentFilterType, Type[])
Constructor
Initialize a new instance of the ComponentAttribute type. - ComponentTypes
Property
The types of the component. - FilterType
Property
Whether the component type should be included or excluded.
- ComponentAttribute(ComponentFilterType, Type[])
- DisabledAttribute
Class
Makes so when building the inner EntitySet of AEntitySetSystem<T> when giving a World instance, it will only contain disabled entities. - ParallelSystem<T>
Class
Represents a collection of ISystem<T> to update in parallel.- ParallelSystem(ISystem<T>, IParallelRunner, ISystem<T>[])
Constructor
Initialises a new instance of the ParallelSystem<T> class. - ParallelSystem(ISystem<T>, IParallelRunner, IEnumerable<ISystem<T>>)
Constructor
Initialises a new instance of the ParallelSystem<T> class. - ParallelSystem(IParallelRunner, ISystem<T>[])
Constructor
Initialises a new instance of the ParallelSystem<T> class. - ParallelSystem(IParallelRunner, IEnumerable<ISystem<T>>)
Constructor
Initialises a new instance of the ParallelSystem<T> class. - IsEnabled
Property
Gets or sets whether the current ParallelSystem<T> instance should update or not. - Dispose()
Method
Disposes all the inner ISystem<T> instances. - Update(T)
Method
Updates the system once.
- ParallelSystem(ISystem<T>, IParallelRunner, ISystem<T>[])
- SequentialSystem<T>
Class
Represents a collection of ISystem<T> to update sequentially.- SequentialSystem(ISystem<T>[])
Constructor
Initialises a new instance of the SequentialSystem<T> class. - SequentialSystem(IEnumerable<ISystem<T>>)
Constructor
Initialises a new instance of the SequentialSystem<T> class. - IsEnabled
Property
Gets or sets whether the current SequentialSystem<T> instance should update or not. - Dispose()
Method
Disposes all the inner ISystem<T> instances. - Update(T)
Method
Updates all the systems once sequentially.
- SequentialSystem(ISystem<T>[])
- WhenAddedAttribute
Class
Represents a component type to react to its addition when building the inner EntitySet of AEntitySetSystem<T> when giving a World instance.- WhenAddedAttribute(Type[])
Constructor
Initialize a new instance of the WhenAddedAttribute type.
- WhenAddedAttribute(Type[])
- WhenAddedEitherAttribute
Class
Represents a group of component types to react to at least one of their addition when building the inner EntitySet of AEntitySetSystem<T> when giving a World instance.- WhenAddedEitherAttribute(Type[])
Constructor
Initialize a new instance of the WithEitherAttribute type.
- WhenAddedEitherAttribute(Type[])
- WhenChangedAttribute
Class
Represents a component type to react to its change when building the inner EntitySet of AEntitySetSystem<T> when giving a World instance.- WhenChangedAttribute(Type[])
Constructor
Initialize a new instance of the WhenChangedAttribute type.
- WhenChangedAttribute(Type[])
- WhenChangedEitherAttribute
Class
Represents a group of component types to react to at least one of their change when building the inner EntitySet of AEntitySetSystem<T> when giving a World instance.- WhenChangedEitherAttribute(Type[])
Constructor
Initialize a new instance of the WithEitherAttribute type.
- WhenChangedEitherAttribute(Type[])
- WhenRemovedAttribute
Class
Represents a component type to react to its deletion when building the inner EntitySet of AEntitySetSystem<T> when giving a World instance.- WhenRemovedAttribute(Type[])
Constructor
Initialize a new instance of the WhenRemovedAttribute type.
- WhenRemovedAttribute(Type[])
- WhenRemovedEitherAttribute
Class
Represents a group of component types to react to at least one of their deletion when building the inner EntitySet of AEntitySetSystem<T> when giving a World instance.- WhenRemovedEitherAttribute(Type[])
Constructor
Initialize a new instance of the WithEitherAttribute type.
- WhenRemovedEitherAttribute(Type[])
- WithAttribute
Class
Represents a component type to include when building the inner EntitySet of AEntitySetSystem<T> when giving a World instance.- WithAttribute(Type[])
Constructor
Initialize a new instance of the WithAttribute type.
- WithAttribute(Type[])
- WithEitherAttribute
Class
Represents a group of component types which at least one should be present when building the inner EntitySet of AEntitySetSystem<T> when giving a World instance.- WithEitherAttribute(Type[])
Constructor
Initialize a new instance of the WithEitherAttribute type.
- WithEitherAttribute(Type[])
- WithoutAttribute
Class
Represents a component type to exclude when building the inner EntitySet of AEntitySetSystem<T> when giving a World instance.- WithoutAttribute(Type[])
Constructor
Initialize a new instance of the WithoutAttribute type.
- WithoutAttribute(Type[])
- WithoutEitherAttribute
Class
Represents a group of component types which at least one should not be present when building the inner EntitySet of AEntitySetSystem<T> when giving a World instance.- WithoutEitherAttribute(Type[])
Constructor
Initialize a new instance of the WithEitherAttribute type.
- WithoutEitherAttribute(Type[])
- WithPredicateAttribute
Class
Makes so when building the inner EntitySet of AEntitySetSystem<T> when giving a World instance, the decorated method will be used as a component predicate.
The decorated method should be of the type ComponentPredicate<T>(T). - ISystem<T>
Interface
Exposes a method to update a system.- IsEnabled
Property
Gets or sets whether the current ISystem<T> instance should update or not. - Update(T)
Method
Updates the system once.
Does nothing if IsEnabled is false.
- IsEnabled
- ComponentFilterType
Enum
Specifies which filter rule should be applied when using a ComponentAttribute.- WhenAdded
Field
Given component types are added. - WhenAddedEither
Field
At least one of the given component types is added. - WhenChanged
Field
Given component types are changed. - WhenChangedEither
Field
At least one of the given component types is changed. - WhenRemoved
Field
Given component types are removed. - WhenRemovedEither
Field
At least one of the given component types is removed. - With
Field
Given component types should be present. - WithEither
Field
At least one of the given component types should be present. - Without
Field
Given component type should be absent. - WithoutEither
Field
At least one of the given component types should not be present.
- WhenAdded
The DefaultEcs.Threading namespace contains types used for multithreading operations.
- DefaultParallelRunner
Class
Represents an object used to run an IParallelRunnable by using multiple System.Threading.Tasks.Task.- DefaultParallelRunner(int)
Constructor
Initialises a new instance of the DefaultParallelRunner class. - DegreeOfParallelism
Property
Gets the degree of parallelism used to run an IParallelRunnable. - Dispose()
Method
Releases all the resources used by the current DefaultParallelRunner instance. - Run(IParallelRunnable)
Method
Runs the provided IParallelRunnable.
- DefaultParallelRunner(int)
- IParallelRunnable
Interface
Exposes a method to run a process in parallel.- Run(int, int)
Method
Runs the part index out of maxIndex of the process.
- Run(int, int)
- IParallelRunner
Interface
Exposes a method to run in parallel a IParallelRunnable.- DegreeOfParallelism
Property
Gets the degree of parallelism used to run an IParallelRunnable. - Run(IParallelRunnable)
Method
Runs the provided IParallelRunnable.
- DegreeOfParallelism