Skip to content

Get Sansar

Script API

ObjectId

Where: Client
More page actions

For the complete documentation index, see llms.txt. This page is also available as Markdown.

Struct Namespace Sansar.Script

Encapsulates an Object Id.

public struct ObjectId

Remarks

An ObjectId can be derived from a ComponentId.

Members at a glance

KindMembers
FieldsInvalid
MethodsEquals · GetHashCode · ToString
Operatorsop_Equality · op_Implicit · op_Inequality

Fields

Invalid

public static readonly ObjectId Invalid

The 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.

ParameterTypeDescription
objobjectThe 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.

ParameterTypeDescription
aObjectIdFirst ObjectId to compare.
bObjectIdSecond 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.

ParameterTypeDescription
iduintA 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.

ParameterTypeDescription
aObjectIdFirst ObjectId to compare.
bObjectIdSecond ObjectId to compare.

Returns: bool — true if the ObjectIds have a different value.

Remarks

This is a value comparison.

Used in examples

…and 28 more examples in the snapshot.

Generated from the Sansar 47.10.0 client ScriptApi snapshot.