2D-Platformer/Assets/Scripts/Events/EventComponentGroup.cs
2022-02-12 12:53:50 +02:00

13 lines
No EOL
416 B
C#

using Unity.Entities;
namespace Events
{
public static class EventComponentGroupEntityComponentBufferExtensions
{
public static void RemoveEventComponents<T>(this EntityCommandBuffer buffer, EntityQueryBuilder queryBuilder)
where T : struct, IComponentData, IEventComponentData
{
queryBuilder.ForEach((Entity entity, ref T e) => { buffer.RemoveComponent<InventoryDirtyEventData>(entity); });
}
}
}