AgentPublic

Sansar.Simulation.AgentPublic

AgentPublic Class

The AgentPublic class is a more limited subset of the Sansar.Simulation.AgentPrivate API for use by other scripts in the scene.

Syntax

[Sansar.Script.Interface]
public class AgentPublic : Sansar.Script.InstanceInterface

Exceptions

Type Reason
NullReferenceException Thrown when using an AgentPublic for a user who is no longer in the region.

Remarks

AgentPublic has a more limited API than Sansar.Simulation.AgentPrivate. Agents may leave the scene at any time. Attempting to use an AgentPublic interface for an agent no longer in the scene will throw a NullReferenceException.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Members

See Also: Inherited members from Sansar.Script.InstanceInterface.

Public Properties

[read-only]
 
AgentInfo AgentInfo . Returns the Sansar.Simulation.AgentInfo for this instance.
[read-only]
 
IsValid bool . Whether or not this interface is valid. (Inherited from Sansar.Script.InstanceInterface.)

Public Methods

  SendChat (string)
Sends a string message to the AgentPublic.
override
ToString () : string
A string representation of this object.

Member Details

AgentInfo Property

Returns the Sansar.Simulation.AgentInfo for this instance.

Syntax

[get: Sansar.Script.Interface]
public AgentInfo AgentInfo { get; }

Value

The Sansar.Simulation.AgentInfo for this instance

Remarks

The Sansar.Simulation.AgentInfo holds information about an agent.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SendChat Method

Sends a string message to the AgentPublic.

Syntax

[Sansar.Script.Interface]
public void SendChat (string message)

Parameters

message
The message to send.

Remarks

Messages may be throttled and ignored.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

ToString Method

A string representation of this object.

Syntax

[Sansar.Script.Interface]
public override string ToString ()

Returns

A string representation of this object.

Remarks

The format of this string may change between releases.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0


Was this article helpful?
0 out of 1 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.