Method Has
Has<T>(ref ComponentTypeHandle<T>)
Reports whether this chunk contains the specified component type.
Declaration
public readonly bool Has<T>(ref ComponentTypeHandle<T> typeHandle) where T : IComponentData, new()
Parameters
Type | Name | Description |
---|---|---|
Component |
typeHandle | An object containing type and job safety information. To create this
object, call Get |
Returns
Type | Description |
---|---|
bool | True, if this chunk contains an array of the specified component type. |
Type Parameters
Name | Description |
---|---|
T | The data type of the component. |
Remarks
When an Entity
Has<T>(ComponentTypeHandle<T>)
Obsolete. Use Has<T>(ref Component
Declaration
[Obsolete("The typeHandle argument should now be passed by ref. (RemovedAfter Entities 1.0)", false)]
public readonly bool Has<T>(ComponentTypeHandle<T> typeHandle) where T : IComponentData, new()
Parameters
Type | Name | Description |
---|---|---|
Component |
typeHandle | An object containing type and job safety information. To create this
object, call Get |
Returns
Type | Description |
---|---|
bool | True, if this chunk contains an array of the specified component type. |
Type Parameters
Name | Description |
---|---|
T | The data type of the component. |
Has<T>()
Reports whether this chunk contains the specified component type.
Declaration
public readonly bool Has<T>()
Returns
Type | Description |
---|---|
bool | True, if this chunk contains an array of the specified component type. |
Type Parameters
Name | Description |
---|---|
T | The data type of the component. |
Remarks
When an Entity
Has(ref DynamicComponentTypeHandle)
Reports whether this chunk contains the specified component type.
Declaration
public readonly bool Has(ref DynamicComponentTypeHandle typeHandle)
Parameters
Type | Name | Description |
---|---|---|
Dynamic |
typeHandle | Type handle for the component type to query. |
Returns
Type | Description |
---|---|
bool | True, if this chunk contains an array of the specified component type. |
Has(DynamicComponentTypeHandle)
Obsolete. Use Has(ref Dynamic
Declaration
[Obsolete("The typeHandle argument should now be passed by ref. (RemovedAfter Entities 1.0)", false)]
public readonly bool Has(DynamicComponentTypeHandle typeHandle)
Parameters
Type | Name | Description |
---|---|---|
Dynamic |
typeHandle | Type handle for the component type to query. |
Returns
Type | Description |
---|---|
bool | True, if this chunk contains an array of the specified component type. |
Has<T>(SharedComponentTypeHandle<T>)
Reports whether this chunk contains a shared component of the specified component type.
Declaration
public readonly bool Has<T>(SharedComponentTypeHandle<T> typeHandle) where T : struct, ISharedComponentData
Parameters
Type | Name | Description |
---|---|---|
Shared |
typeHandle | An object containing type and job safety information. To create this
object, call Get |
Returns
Type | Description |
---|---|
bool | True, if this chunk contains a shared component of the specified type. |
Type Parameters
Name | Description |
---|---|
T | The data type of the shared component. |
Remarks
When an Entity
Has(ref DynamicSharedComponentTypeHandle)
Reports whether this chunk contains a shared component of the specified component type.
Declaration
public readonly bool Has(ref DynamicSharedComponentTypeHandle typeHandle)
Parameters
Type | Name | Description |
---|---|---|
Dynamic |
typeHandle | An object containing type and job safety information. To create this
object, call Get |
Returns
Type | Description |
---|---|
bool | True, if this chunk contains a shared component of the specified type. |
Remarks
When an Entity
Has(DynamicSharedComponentTypeHandle)
Obsolete. Use Has(ref Dynamic
Declaration
[Obsolete("The typeHandle argument should now be passed by ref. (RemovedAfter Entities 1.0)", false)]
public readonly bool Has(DynamicSharedComponentTypeHandle typeHandle)
Parameters
Type | Name | Description |
---|---|---|
Dynamic |
typeHandle | An object containing type and job safety information. To create this
object, call Get |
Returns
Type | Description |
---|---|
bool | True, if this chunk contains a shared component of the specified type. |
Remarks
When an Entity
Has<T>(ref BufferTypeHandle<T>)
Reports whether this chunk contains a dynamic buffer containing the specified component type.
Declaration
public readonly bool Has<T>(ref BufferTypeHandle<T> bufferTypeHandle) where T : unmanaged, IBufferElementData
Parameters
Type | Name | Description |
---|---|---|
Buffer |
bufferTypeHandle | An object containing type and job safety information. To create this
object, call Get |
Returns
Type | Description |
---|---|
bool | True, if this chunk contains an array of the dynamic buffers containing the specified component type. |
Type Parameters
Name | Description |
---|---|
T | The data type of the component stored in the dynamic buffer. |
Remarks
When an Entity
Has<T>(BufferTypeHandle<T>)
Obsolete. Use Has<T>(ref Buffer
Declaration
[Obsolete("The bufferTypeHandle argument should now be passed by ref. (RemovedAfter Entities 1.0)", false)]
public readonly bool Has<T>(BufferTypeHandle<T> bufferTypeHandle) where T : unmanaged, IBufferElementData
Parameters
Type | Name | Description |
---|---|---|
Buffer |
bufferTypeHandle | An object containing type and job safety information. To create this
object, call Get |
Returns
Type | Description |
---|---|
bool | True, if this chunk contains an array of the dynamic buffers containing the specified component type. |
Type Parameters
Name | Description |
---|---|
T | The data type of the component stored in the dynamic buffer. |