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

Agents may leave at any time. Attempting to use an Agent interface for an agent no longer in the scene will throw a NullReferenceException.Use via AgentScript.AgentPrivate to access APIs for the agent the script is on.

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.

Public Methods

  PlaySound (SoundResourcePlaySettings) : PlayHandle
Play sound to direct output.
  PlaySoundAtPosition (SoundResourceSansar.VectorPlaySettings) : PlayHandle
Play sound at specified position.
  PlaySoundOnComponent (SoundResourceAudioComponentPlaySettings) : PlayHandle
Play sound on a component (and follows its position).
  SendChat (string)
Sends a string message to the AgentPrivate.

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

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


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

0 Comments

Article is closed for comments.