EventFilter.md
July 25, 2024 · View on GitHub
Friflo.Engine.ECS
Friflo.Engine.ECS
EventFilter Class
Used to filter structural changes made to an entity like added / removed components / tags using HasEvent(int).
The EventRecorder must be enabled to get add / remove events.
See Example.
public sealed class EventFilter
Inheritance System.Object 🡒 EventFilter
| Constructors | |
|---|---|
| EventFilter(EventRecorder) | Create and event filter for the passed EventRecorder. |
| Methods | |
|---|---|
| ComponentAdded<T>() | Enable filtering add component events of the given IComponent type T. |
| ComponentRemoved<T>() | Enable filtering remove component events of the given IComponent type T. |
| HasEvent(int) | Returns true if a component or tag was added / removed to / from the entity with the passed entityId. |
| TagAdded<T>() | Enable filtering add tag events of the given ITag type T. |
| TagRemoved<T>() | Enable filtering remove tag events of the given ITag type T. |
| ToString() |