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
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
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
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 instanceRemarks
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 $className$.Syntax
Parameters
- message
- The message to send.
Exceptions
Type Reason NullReferenceException If the user is no longer online. Sansar.Script.ThrottleException If the throttle rate is exceeded. Remarks
eprecated. Use AgentPrivate.SendChat or AgentPublic.SendChatRequirements
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, Action<Sansar.Script.OperationCompleteEvent> handler)Parameters
- message
- The message to send.
- handler
- Handler to be called when the event completes.
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
0 Comments