Method DidChange
DidChange<T>(ref ComponentTypeHandle<T>, uint)
Reports whether the data in any of IComponentData components in the chunk, of the type identified by
typeHandle
, could have changed since the specified version.
Declaration
public readonly bool DidChange<T>(ref ComponentTypeHandle<T> typeHandle, uint version) where T : IComponentData
Parameters
Type | Name | Description |
---|---|---|
Component |
typeHandle | An object containing type and job safety information. To create this
object, call Get |
uint | version | The version to compare. In a system, this parameter should be set to the
current Last |
Returns
Type | Description |
---|---|
bool | True, if the version number stored in the chunk for this component is more recent than the version
passed to the |
Type Parameters
Name | Description |
---|---|
T | The component type. |
Remarks
When you access a component in a chunk with write privileges, the ECS framework updates the change version
of that component type to the current Global
Note that for efficiency, the change version applies to whole chunks not individual entities. The change version is updated even when another job or system that has declared write access to a component does not actually change the component value.
DidChange<T>(ComponentTypeHandle<T>, uint)
Obsolete. Use Did
Declaration
[Obsolete("The typeHandle argument should now be passed by ref. (RemovedAfter Entities 1.0)", false)]
public readonly bool DidChange<T>(ComponentTypeHandle<T> typeHandle, uint version) where T : IComponentData
Parameters
Type | Name | Description |
---|---|---|
Component |
typeHandle | An object containing type and job safety information. To create this
object, call Get |
uint | version | The version to compare. In a system, this parameter should be set to the
current Last |
Returns
Type | Description |
---|---|
bool | True, if the version number stored in the chunk for this component is more recent than the version
passed to the |
Type Parameters
Name | Description |
---|---|
T | The component type. |
DidChange(ref DynamicComponentTypeHandle, uint)
Reports whether the data in any of IComponentData components in the chunk, of the type identified by
typeHandle
, could have changed since the specified version.
Declaration
public readonly bool DidChange(ref DynamicComponentTypeHandle typeHandle, uint version)
Parameters
Type | Name | Description |
---|---|---|
Dynamic |
typeHandle | An object containing type and job safety information. To create this
object, call Get |
uint | version | The version to compare. In a system, this parameter should be set to the
current Last |
Returns
Type | Description |
---|---|
bool | True, if the version number stored in the chunk for this component is more recent than the version
passed to the |
Remarks
When you access a component in a chunk with write privileges, the ECS framework updates the change version
of that component type to the current Global
Note that for efficiency, the change version applies to whole chunks not individual entities. The change version is updated even when another job or system that has declared write access to a component does not actually change the component value.
DidChange(DynamicComponentTypeHandle, uint)
Obsolete. Use Did
Declaration
[Obsolete("The typeHandle argument should now be passed by ref. (RemovedAfter Entities 1.0)", false)]
public readonly bool DidChange(DynamicComponentTypeHandle typeHandle, uint version)
Parameters
Type | Name | Description |
---|---|---|
Dynamic |
typeHandle | An object containing type and job safety information. To create this
object, call Get |
uint | version | The version to compare. In a system, this parameter should be set to the
current Last |
Returns
Type | Description |
---|---|
bool | True, if the version number stored in the chunk for this component is more recent than the version
passed to the |
DidChange<T>(ref BufferTypeHandle<T>, uint)
Reports whether any of the data in dynamic buffer components in the chunk, of the type identified by
bufferTypeHandle
, could have changed since the specified version.
Declaration
public readonly bool DidChange<T>(ref BufferTypeHandle<T> bufferTypeHandle, uint version) where T : unmanaged, IBufferElementData
Parameters
Type | Name | Description |
---|---|---|
Buffer |
bufferTypeHandle | An object containing type and job safety information. To create this
object, call Get |
uint | version | The version to compare. In a system, this parameter should be set to the
current Last |
Returns
Type | Description |
---|---|
bool | True, if the version number stored in the chunk for this component is more recent than the version
passed to the |
Type Parameters
Name | Description |
---|---|
T | The data type of the elements in the dynamic buffer. |
Remarks
When you access a component in a chunk with write privileges, the ECS framework updates the change version
of that component type to the current Global
Note that for efficiency, the change version applies to whole chunks not individual entities. The change version is updated even when another job or system that has declared write access to a component does not actually change the component value.
DidChange<T>(BufferTypeHandle<T>, uint)
Obsolete. Use Did
Declaration
[Obsolete("The bufferTypeHandle argument should now be passed by ref. (RemovedAfter Entities 1.0)", false)]
public readonly bool DidChange<T>(BufferTypeHandle<T> bufferTypeHandle, uint version) where T : unmanaged, IBufferElementData
Parameters
Type | Name | Description |
---|---|---|
Buffer |
bufferTypeHandle | An object containing type and job safety information. To create this
object, call Get |
uint | version | The version to compare. In a system, this parameter should be set to the
current Last |
Returns
Type | Description |
---|---|
bool | True, if the version number stored in the chunk for this component is more recent than the version
passed to the |
Type Parameters
Name | Description |
---|---|
T | The data type of the elements in the dynamic buffer. |
DidChange<T>(SharedComponentTypeHandle<T>, uint)
Reports whether the value of shared components associated with the chunk, of the type identified by
chunkSharedComponentData
, could have changed since the specified version.
Declaration
public readonly bool DidChange<T>(SharedComponentTypeHandle<T> chunkSharedComponentData, uint version) where T : struct, ISharedComponentData
Parameters
Type | Name | Description |
---|---|---|
Shared |
chunkSharedComponentData | An object containing type and job safety information. To create this
object, call Get |
uint | version | The version to compare. In a system, this parameter should be set to the
current Last |
Returns
Type | Description |
---|---|
bool | True, if the version number stored in the chunk for this component is more recent than the version
passed to the |
Type Parameters
Name | Description |
---|---|
T | The data type of the shared component. |
Remarks
Shared components behave differently than other types of components in terms of change versioning because changing the value of a shared component can move an entity to a different chunk. If the change results in an entity moving to a different chunk, then only the order version is updated (for both the original and the receiving chunk). If you change the shared component value for all entities in a chunk at once, the change version for that chunk is updated. The order version is unaffected.
Note that for efficiency, the change version applies to whole chunks not individual entities. The change version is updated even when another job or system that has declared write access to a component does not actually change the component value.
DidChange(ref DynamicSharedComponentTypeHandle, uint)
Reports whether the value of shared components associated with the chunk, of the type identified by
typeHandle
, could have changed since the specified version.
Declaration
public readonly bool DidChange(ref DynamicSharedComponentTypeHandle typeHandle, uint version)
Parameters
Type | Name | Description |
---|---|---|
Dynamic |
typeHandle | An object containing type and job safety information. To create this
object, call Get |
uint | version | The version to compare. In a system, this parameter should be set to the
current Last |
Returns
Type | Description |
---|---|
bool | True, if the version number stored in the chunk for this component is more recent than the version
passed to the |
Remarks
Shared components behave differently than other types of components in terms of change versioning because changing the value of a shared component can move an entity to a different chunk. If the change results in an entity moving to a different chunk, then only the order version is updated (for both the original and the receiving chunk). If you change the shared component value for all entities in a chunk at once, the change version for that chunk is updated. The order version is unaffected.
Note that for efficiency, the change version applies to whole chunks not individual entities. The change version is updated even when another job or system that has declared write access to a component does not actually change the component value.
DidChange(DynamicSharedComponentTypeHandle, uint)
Obsolete. Use Did
Declaration
[Obsolete("The typeHandle argument should now be passed by ref. (RemovedAfter Entities 1.0)", false)]
public readonly bool DidChange(DynamicSharedComponentTypeHandle typeHandle, uint version)
Parameters
Type | Name | Description |
---|---|---|
Dynamic |
typeHandle | An object containing type and job safety information. To create this
object, call Get |
uint | version | The version to compare. In a system, this parameter should be set to the
current Last |
Returns
Type | Description |
---|---|
bool | True, if the version number stored in the chunk for this component is more recent than the version
passed to the |