Skip to content

Get Sansar

Script API

AgentInfo

Where: Client
More page actions

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

The AgentInfo class has basic information and IDs for an agent.

public class AgentInfo : Sansar.Script.InstanceInterface

Remarks

Agents may leave at any time. Attempting to use an AgentInfo interface for an agent no longer in the scene will throw a NullReferenceException.

Members at a glance

KindMembers
PropertiesAvatarUuid · Handle · Name · ObjectId · Scale · SessionId · Ticket
MethodsToString

Properties

AvatarUuid

public Guid AvatarUuid { get; }

Returns the persona ID of the AgentInfo.

Value: Guid — The persona ID of the AgentInfo

Remarks

Agent persona IDs are unique

Handle

public string Handle { get; }

Returns the handle of the AgentInfo.

Value: string — The handle of the AgentInfo

Remarks

Agent handles are unique.

Name

public string Name { get; }

Returns the name of the AgentInfo.

Value: string — The name of the AgentInfo

Remarks

Agent names may not be unique.

ObjectId

public Sansar.Script.ObjectId ObjectId { get; }

Returns the ObjectId of the AgentInfo.

Value: Sansar.Script.ObjectId — The object ID of the AgentInfo

Remarks

The object id can be used to compare agents or look up the ObjectPrivate associated with the agent.

Scale

Added in 33.2.0
public float Scale { get; }

Returns the scale for the user.

Value: float — The scale of the user

Remarks

This is the scale setting from the character editor.

SessionId

public Sansar.Script.SessionId SessionId { get; }

Returns the Id of the AgentInfo.

Value: Sansar.Script.SessionId — The id of the AgentInfo

Remarks

The id can be used for quick comparison between Agents.

Ticket

Added in 31.1.0
public string Ticket { get; }

Returns the ticket for the user if they purchased one.

Value: string — The ticket of the user

Remarks

Will be an empty string if no ticket was used to enter the scene or event.

Methods

ToString

public override string ToString()

A string representation of this object.

Returns: string — A string representation of this object.

Remarks

The format of this string may change between releases.

Used in examples

…and 41 more examples in the snapshot.

Generated from the Sansar 47.10.0 client ScriptApi snapshot.