Represents a collection of Entity mapped to a TKey component. Multiple Entity can be associated with a given TKey.
public sealed class EntityMultiMap<TKey> :
System.IDisposable
TKey
The type of the component used as key.
Inheritance System.Object 🡒 EntityMultiMap
Implements System.IDisposable
Properties | |
---|---|
Keys | Gets the keys contained in the EntityMultiMap<TKey>. |
this[TKey] | Gets the Entity instances associated with the specified key. |
World | Gets 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. |
ContainsKey(TKey) | Determines whether the EntityMultiMap<TKey> contains the specified key. |
Count(TKey) | Gets the number of Entity in the current EntityMultiMap<TKey> for the given TKey. |
Dispose() | Releases current EntitySet of its subscriptions, stopping it to get modifications on the World's Entity. |
TrimExcess() | Resizes inner storage to exactly the number of Entity this DefaultEcs.IEntityContainer contains. |
TryGetEntities(TKey, ReadOnlySpan<Entity>) | Gets the Entity instances associated with the specified key. |
Events | |
---|---|
EntityAdded | Occurs when an Entity is added in the current DefaultEcs.IEntityContainer. |
EntityRemoved | Occurs when an Entity is removed from the current DefaultEcs.IEntityContainer. |