Method IsBufferEnabled
IsBufferEnabled<T>(Entity)
Checks whether the IBufferElementData of type T is enabled on the specified Entity. For the purposes of EntityQuery matching, an entity with a disabled component will behave as if it does not have that component. The type T must implement the IEnableableComponent interface.
Declaration
public static bool IsBufferEnabled<T>(Entity entity) where T : unmanaged, IBufferElementData, IEnableableComponent
Parameters
Type | Name | Description |
---|---|---|
Entity | entity | The entity whose component should be checked. |
Returns
Type | Description |
---|---|
bool | True if the specified component is enabled, or false if it is disabled. |
Type Parameters
Name | Description |
---|---|
T | An unmanaged IComponentData type |
Remarks
Not working in Entities.ForEach, IJobEntity, Utility methods, and Aspects
Exceptions
Type | Condition |
---|---|
ArgumentException | The Entity does not exist. |