The AgentInfo class has basic information and IDs for an agent.
public class AgentInfo : Sansar.Script.InstanceInterfaceRemarks
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
| Kind | Members |
|---|---|
| Properties | AvatarUuid · Handle · Name · ObjectId · Scale · SessionId · Ticket |
| Methods | ToString |
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
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
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
- MoverExample1.cs
- MoverExample3.cs
- ReflectiveDetectorExample.cs
- StatsExample.cs
- TeleportHotkeys.cs
- VisitorTrackerExample.cs
- BanHammerExample.cs
CameraShakeExample.cs- CastRayExample.cs
- CoroutineEventExample.cs
- CoroutineExample.cs
- EventExample.cs
…and 41 more examples in the snapshot.
Generated from the Sansar 47.10.0 client ScriptApi snapshot.