EntitySet.md

March 19, 2022 ยท View on GitHub

DefaultEcs

DefaultEcs

EntitySet Class

Represents a sub-selection of Entity instances from a World.

public sealed class EntitySet :
System.IDisposable

Inheritance System.Object ๐Ÿก’ EntitySet

Implements System.IDisposable

Properties
CountGets the number of Entity in the current EntitySet.
WorldGets the World instance from which current DefaultEcs.IEntityContainer originate.
Methods
Complete()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)Determines whether the DefaultEcs.IEntityContainer contains a specific Entity.
Dispose()Releases current EntitySet of its subscriptions, stopping it to get modifications on the World's Entity.
GetEntities()Gets the Entity contained in the current EntitySet.
TrimExcess()Resizes inner storage to exactly the number of Entity this DefaultEcs.IEntityContainer contains.
Events
EntityAddedOccurs when an Entity is added in the current DefaultEcs.IEntityContainer.
EntityRemovedOccurs when an Entity is removed from the current DefaultEcs.IEntityContainer.