Agent Info
Agent info, Private, Public, and Scripts docs.
Last updated
Agent info, Private, Public, and Scripts docs.
Last updated
The AgentInfo class has basic information and IDs for an agent.
Returns the persona ID of the AgentInfo.
Syntax[get: Sansar.Script.Interface] public AvatarUuid { get; }
Value
The persona ID of the AgentInfo
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Returns the handle of the AgentInfo.
SyntaxValue
The handle of the AgentInfo
RemarksAgent handles are unique.
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Returns the name of the AgentInfo.
SyntaxValue
The name of the AgentInfo
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Returns the ObjectId of the AgentInfo.
SyntaxValue
The object ID of the AgentInfo
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Returns the scale for the user.
SyntaxValue
The scale of the user
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Returns the Id of the AgentInfo.
SyntaxValue
The id of the AgentInfo
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Returns the ticket for the user if they purchased one.
SyntaxValue
The ticket of the user
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
A string representation of this object.
SyntaxReturns
A string representation of this object.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
The AgentPrivate class is the full interface for interactions with avatars.
SyntaxValue
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SyntaxValue
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Retrieves whether the control point is enabled.
SyntaxParameters
type
Returns
True if the control point is enabled. Control points are enabled when used.
Exceptions
Thrown if an invalid control point is specified.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Retrieves the orientation in character relative space of the specified control point.
SyntaxParameters
type
Returns
The orientation of the control point.
Exceptions
Thrown if an invalid control point is specified.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Retrieves the position in character relative space of the specified control point.
SyntaxParameters
type
Returns
The position of the control point.
Exceptions
Thrown if an invalid control point is specified.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Retrieves what factor of the world's gravity is applied to this agent.
SyntaxReturns
The gravity factor.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SyntaxReturns
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SyntaxParameters
rigidBodyComponent
The RigidBodyComponent with which to change collision behavior.
ignoreBody
When true, collision will be added to the ignore list. When false, collision will removed from the ignore list.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SyntaxParameters
rigidBodyComponent
The RigidBodyComponent with which to change collision behavior.
ignoreBody
When true, collision will be added to the ignore list. When false, collision will removed from the ignore list.
handler
Handler to be called when the event completes.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SyntaxParameters
rigidBodyComponent
The RigidBodyComponent that could possibly be ignored.
Returns
Documentation for this section has not yet been entered.
RemarksDocumentation for this section has not yet been entered.
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Overrides source of web audio streams.
SyntaxParameters
url
URL to use.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Overrides source of web audio streams.
SyntaxParameters
url
URL to use.
handler
Handler to be called when the event completes.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Sets stream channel source.
SyntaxParameters
url
URL to use.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Overrides source of media surfaces.
SyntaxParameters
url
URL to use.
mediaWidth
(cMediaChannel only) source width.
mediaHeight
(cMediaChannel only) source height.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Overrides source of media surfaces.
SyntaxParameters
url
URL to use.
mediaWidth
(cMediaChannel only) source width.
mediaHeight
(cMediaChannel only) source height.
handler
Handler to be called when the event completes.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Performs a specific action on the current media surface.
SyntaxParameters
action
The action to perform.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Performs a specific action on the current media surface.
SyntaxParameters
action
The action to perform.
handler
Handler to be called when the event completes.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Play sound to direct output.
SyntaxParameters
soundResource
The sound resource to play.
playSettings
The play parameters.
Returns
The play handle for controlling playback.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Play sound at specified position.
SyntaxParameters
soundResource
The sound resource to play.
position
The absolute position.
playSettings
The play parameters.
Returns
The play handle for controlling playback.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Play sound on a component (and follows its position).
SyntaxParameters
soundResource
The sound resource to play.
audioComponent
The audio component to play this on.
playSettings
The play parameters.
Returns
The play handle for controlling playback.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Play audio stream to direct output.
SyntaxParameters
streamChannel
Channel of the audio stream to play.
loudness
Relative loudness in dB.
Returns
The play handle for controlling playback.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Play web audio stream at specified position.
SyntaxParameters
streamChannel
Channel of the audio stream to play.
position
The absolute position.
loudness
Relative loudness in dB.
Returns
The play handle for controlling playback.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Play web audio stream on this component (and follow its position).
SyntaxParameters
streamChannel
Channel of the audio stream to play.
audioComponent
The audio component to play this on.
loudness
Relative loudness in dB.
Returns
The play handle for controlling playback.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SyntaxParameters
message
The message to send.
Exceptions
If the user is no longer online.
If the throttle rate is exceeded.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SyntaxParameters
message
The message to send.
handler
Handler to be called when the event completes.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Sets what factor of the world's gravity is applied to this agent.
SyntaxParameters
gravityFactor
The gravityFactor. Default value is 1, range is -2 to 2
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Sets what factor of the world's gravity is applied to this agent.
SyntaxParameters
gravityFactor
The gravityFactor. Default value is 1, range is -2 to 2
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
A string representation of this object.
SyntaxReturns
A string representation of this object.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SyntaxValue
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SyntaxParameters
message
The message to send.
Exceptions
If the user is no longer online.
If the throttle rate is exceeded.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SyntaxParameters
message
The message to send.
handler
Handler to be called when the event completes.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
A string representation of this object.
SyntaxReturns
A string representation of this object.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Extend AgentScript to create a script to be attached directly to an agent. For future use: Sansar does not currently support adding scripts to agents.
Syntax[Sansar.Script.Interface] protected AgentScript ()
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
The Agent API for the agent this script is attached to.
SyntaxValue
The Agent this script is attached to if the script is on an avatar, null otherwise.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
The ObjectPrivate this script is attached to if it is attached to an object.
SyntaxValue
The scene object this script is attached to if it is attached to an object, null otherwise.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Basic scene information for the current scene.
SyntaxValue
The Scene this object is in.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
[get: Sansar.Script.Interface] public Handle { get; }
[get: Sansar.Script.Interface] public Name { get; }
[get: Sansar.Script.Interface] public Scale { get; }
[get: Sansar.Script.Interface] public Ticket { get; }
[Sansar.Script.Interface] public override ToString ()
[get: Sansar.Script.Interface] public AgentInfo { get; }
The for this instance
[get: Sansar.Script.Interface] public Client { get; }
The for this instance
[Sansar.Script.Interface] public GetControlPointEnabled ( type)
See .
See .
The control point to get the position of. See .
[Sansar.Script.Interface] public GetGravityFactor ()
a list of
[Sansar.Script.Interface] public IgnoreCollisionWith ( rigidBodyComponent, ignoreBody)
This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to while in a coroutine.
This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to while in a coroutine.
[Sansar.Script.Interface] public IsCollisionIgnoredWith ( rigidBodyComponent)
[Sansar.Script.Interface] public OverrideAudioStream ( url)
[Sansar.Script.Interface] public OverrideMediaSource ( url)
[Sansar.Script.Interface] public OverrideMediaSource ( url, mediaWidth, mediaHeight)
[Sansar.Script.Interface] public PerformMediaAction ( action)
Sends a message to the $className$.
[Sansar.Script.Interface] public SendChat ( message)
Sends a message to the AgentPrivate.
[Sansar.Script.Interface] public SetGravityFactor ( gravityFactor)
[Sansar.Script.Interface] public override ToString ()
The AgentPublic class is a more limited subset of the API for use by other scripts in the scene.
[get: Sansar.Script.Interface] public AgentInfo { get; }
The for this instance
Sends a message to the $className$.
[Sansar.Script.Interface] public SendChat ( message)
Sends a message to the AgentPublic.
[Sansar.Script.Interface] public override ToString ()
This constructor is called before any properties have been set. Override to initialize the script after properties have been set.
[Sansar.Script.NonReflective] [get: Sansar.Script.Interface] public AgentPrivate { protected get; set; }
[Sansar.Script.NonReflective] [get: Sansar.Script.Interface] public ObjectPrivate { protected get; set; }
[Sansar.Script.NonReflective] [get: Sansar.Script.Interface] public ScenePublic { protected get; set; }