Struct SpatialRegionHandle
Opaque handle to a registered trigger region. Validated via generation counter to detect use-after-destroy.
public readonly struct SpatialRegionHandle : IEquatable<SpatialRegionHandle>
- Implements
- Inherited Members
Methods
Equals(object)
Indicates whether obj is a SpatialRegionHandle equal to this one.
public override bool Equals(object obj)
Parameters
objobjectObject to compare against.
Returns
- bool
trueifobjis an equal handle.
Equals(SpatialRegionHandle)
Indicates whether this handle equals other (same slot index and generation).
public bool Equals(SpatialRegionHandle other)
Parameters
otherSpatialRegionHandleHandle to compare against.
Returns
- bool
trueif both refer to the same region registration.
GetHashCode()
Returns a hash code combining the slot index and generation.
public override int GetHashCode()
Returns
ToString()
Returns a string of the form Region(index:generation).
public override string ToString()
Returns
Operators
operator ==(SpatialRegionHandle, SpatialRegionHandle)
Equality operator; see Equals(SpatialRegionHandle).
public static bool operator ==(SpatialRegionHandle left, SpatialRegionHandle right)
Parameters
leftSpatialRegionHandleLeft handle.
rightSpatialRegionHandleRight handle.
Returns
- bool
trueif the handles are equal.
operator !=(SpatialRegionHandle, SpatialRegionHandle)
Inequality operator; see Equals(SpatialRegionHandle).
public static bool operator !=(SpatialRegionHandle left, SpatialRegionHandle right)
Parameters
leftSpatialRegionHandleLeft handle.
rightSpatialRegionHandleRight handle.
Returns
- bool
trueif the handles differ.