Description
The Version
property of the CollisionRules
class in the Sandbox.Physics
namespace represents the version number of the collision rules configuration. This property is virtual, allowing derived classes to override it if necessary. It is an integer value that can be used to track changes or updates to the collision rules.
Usage
Use the Version
property to get or set the version number of the collision rules. This can be useful for ensuring compatibility or for debugging purposes when dealing with different versions of collision configurations.
Example
// Example of accessing the Version property
CollisionRules collisionRules = new CollisionRules();
int currentVersion = collisionRules.Version;
// Update the version
collisionRules.Version = currentVersion + 1;