AgentPrivate

Sansar.Simulation.AgentPrivate

AgentPrivate Class

The AgentPrivate class is the full interface for interactions with avatars.

Syntax

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

Exceptions

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

Remarks

Use via AgentScript.AgentPrivate to access APIs for the agent the script is on.Agents may leave at any time. Attempting to use an Agent 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]
 
Client Client . Returns the Sansar.Simulation.Client for this instance.
[read-only]
 
IsValid bool . Whether or not this interface is valid. (Inherited from Sansar.Script.InstanceInterface.)

Public Methods

  GetControlPointEnabled (ControlPointType) : bool
Retrieves whether the control point is enabled.
  GetControlPointOrientation (ControlPointType) : Sansar.Quaternion
Retrieves the orientation in world space of the specified control point.
  GetControlPointPosition (ControlPointType) : Sansar.Vector
Retrieves the position in world space of the specified control point.
  PlaySound (SoundResource, PlaySettings) : PlayHandle
Play sound to direct output.
  PlaySoundAtPosition (SoundResource, Sansar.Vector, PlaySettings) : PlayHandle
Play sound at specified position.
  PlaySoundOnComponent (SoundResource, AudioComponent, PlaySettings) : PlayHandle
Play sound on a component (and follows its position).
  SendChat (string)
Sends a string message to the AgentPrivate.
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

Client Property

Returns the Sansar.Simulation.Client for this instance.

Syntax

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

Value

The Sansar.Simulation.Client for this instance

Remarks

The Sansar.Simulation.Client manages interactions with a client.

Requirements

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

GetControlPointEnabled Method

Retrieves whether the control point is enabled.

Syntax

[Sansar.Script.Interface]
public bool GetControlPointEnabled (ControlPointType type)

Parameters

type
See Sansar.Simulation.ControlPointType.

Returns

True if the control point is enabled. Control points are enabled when used.

Exceptions

Type Reason
ArgumentException Thrown if an invalid control point is specified.

Remarks

Control points are a representation of some spatial inputs, primarily VR controllers.

Requirements

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

GetControlPointOrientation Method

Retrieves the orientation in world space of the specified control point.

Syntax

[Sansar.Script.Interface]
public Sansar.Quaternion GetControlPointOrientation (ControlPointType type)

Parameters

type
See Sansar.Simulation.ControlPointType.

Returns

The orientation of the control point.

Exceptions

Type Reason
ArgumentException Thrown if an invalid control point is specified.

Remarks

Control points are a representation of some spatial inputs, primarily VR controllers.

Requirements

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

GetControlPointPosition Method

Retrieves the position in world space of the specified control point.

Syntax

[Sansar.Script.Interface]
public Sansar.Vector GetControlPointPosition (ControlPointType type)

Parameters

type
The control point to get the position of. See Sansar.Simulation.ControlPointType.

Returns

The position of the control point.

Exceptions

Type Reason
ArgumentException Thrown if an invalid control point is specified.

Remarks

Control points are a representation of some spatial inputs, primarily VR controllers.

Requirements

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

PlaySound Method

Play sound to direct output.

Syntax

[Sansar.Script.Interface]
public PlayHandle PlaySound (SoundResource soundResource, PlaySettings playSettings)

Parameters

soundResource
The sound resource to play.
playSettings
The play parameters.

Returns

Remarks

Plays for this agent only.

Requirements

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

PlaySoundAtPosition Method

Play sound at specified position.

Syntax

[Sansar.Script.Interface]
public PlayHandle PlaySoundAtPosition (SoundResource soundResource, Sansar.Vector position, PlaySettings playSettings)

Parameters

soundResource
The sound resource to play.
position
The absolute position.
playSettings
The play parameters.

Returns

Remarks

Plays for this agent only. By setting an absolute position, the location of this sound will be static. If you want the sound to move, you must play the sound on an audio component and move the audio component.

Requirements

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

PlaySoundOnComponent Method

Play sound on a component (and follows its position).

Syntax

[Sansar.Script.Interface]
public PlayHandle PlaySoundOnComponent (SoundResource soundResource, AudioComponent audioComponent, PlaySettings playSettings)

Parameters

soundResource
The sound resource to play.
audioComponent
The audio component to play this on.
playSettings
The play parameters.

Returns

Remarks

Plays for this agent only. As the component moves, this sound will follow the component's location.

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

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 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.