Encapsulates an Object Id.
public struct ObjectIdRemarks
An ObjectId can be derived from a ComponentId.
Members at a glance
| Kind | Members |
|---|---|
| Fields | Invalid |
| Methods | Equals · GetHashCode · ToString |
| Operators | op_Equality · op_Implicit · op_Inequality |
Fields
Invalid
public static readonly ObjectId InvalidThe invalid id object.
Remarks
This value is used by certain APIs to represent an invalid ObjectId.
Methods
Equals
public override bool Equals(object obj)Value comparison for ObjectId.
| Parameter | Type | Description |
|---|---|---|
obj | object | The object to compare. |
Returns: bool — true if the argument is an ObjectId and has the same value.
Remarks
This method overrides ValueType.Equals.
GetHashCode
public override int GetHashCode()Retrieves the hash code for this instance.
Returns: int — The hash code for this instance.
Remarks
This method overrides ValueType.GetHashCode.
ToString
public override string ToString()Converts the id to a hexadecimal string representation.
Returns: string — The hexadecimal string representation.
Remarks
This method overrides Object.ToString.
Operators
op_Equality
public static bool operator ==(ObjectId a, ObjectId b)ObjectId equality operator.
| Parameter | Type | Description |
|---|---|---|
a | ObjectId | First ObjectId to compare. |
b | ObjectId | Second ObjectId to compare. |
Returns: bool — true if the ObjectIds have the same value.
Remarks
This is a value comparison.
op_Implicit
public static implicit operator ObjectId(uint id)Internal explicit conversion from a uint.
| Parameter | Type | Description |
|---|---|---|
id | uint | A uint representation of an ObjectId |
Returns: ObjectId — A new ObjectId initialized with the given uint.
Remarks
Internal.
op_Inequality
public static bool operator !=(ObjectId a, ObjectId b)ObjectId inequality operator.
| Parameter | Type | Description |
|---|---|---|
a | ObjectId | First ObjectId to compare. |
b | ObjectId | Second ObjectId to compare. |
Returns: bool — true if the ObjectIds have a different value.
Remarks
This is a value comparison.
Used in examples
- FollowThePath.cs
- MoverExample1.cs
- MoverExample3.cs
- ReflectiveDetectorExample.cs
- StatsExample.cs
- AgentGravityExample.cs
- AgentScaleExample.cs
- BanHammerExample.cs
- CastRayExample.cs
- EventExample.cs
- PewPewExample.cs
- ScriptLibrary/LibraryBase.cs
…and 28 more examples in the snapshot.
Generated from the Sansar 47.10.0 client ScriptApi snapshot.