int The current version number.
Gets the version number of the specified component type.
This version number is incremented each time there is a structural change involving the specified
type of component. Such changes include creating or destroying entities that have this component and adding
or removing the component type from an entity. Shared components are not covered by this version;
see EntityManager.GetSharedComponentOrderVersion.
Version numbers can overflow. To compare if one version is more recent than another, directly checking if
VersionB is greater than VersionA is not sufficient. Instead, use the helper function:
bool VersionBisNewer = ChangeVersionUtility.DidChange(VersionB, VersionA);
| Parameter | Description |
|---|---|
| componentType | The component type. |
int The current version number.
Gets the version number of the specified component type.
This version number is incremented each time there is a structural change involving the specified
type of component. Such changes include creating or destroying entities that have this component and adding
or removing the component type from an entity. Shared components are not covered by this version.
EntityManager.GetSharedComponentOrderVersion.
Version numbers can overflow. To compare if one version is more recent than another, directly checking if
VersionB is greater than VersionA is not sufficient. Instead, use the helper function:
bool VersionBisNewer = ChangeVersionUtility.DidChange(VersionB, VersionA);