Client Class
The Client class is used for access to the Client connected to a Sansar.Simulation.AgentPrivate.
Syntax
[Sansar.Script.Interface]
public class Client : Sansar.Script.InstanceInterface
public class Client : Sansar.Script.InstanceInterface
Remarks
This class is also used for receiving input events from a client.
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.) |
[read-only] | UI | UI . Returns the Sansar.Simulation.UI for this instance. |
Public Methods
ClearTutorialHint ()
Clears any scripted tutorial hint being shown to the player |
||
ClearTutorialHint (Action<Sansar.Script.OperationCompleteEvent>)
Clears any scripted tutorial hint being shown to the player |
||
EnableAutomaticTutorialHints (bool)
Enables / Disables automatic (non-scripted) tutorial hints. |
||
EnableAutomaticTutorialHints (bool, Action<Sansar.Script.OperationCompleteEvent>)
Enables / Disables automatic (non-scripted) tutorial hints. |
||
OpenQuestCharacterDialog (QuestCharacter)
Opens the quest dialog for a character. |
||
OpenStoreListing (Guid)
Opens the product's Store page. |
||
SendChat (string)
Sends a string message to the $className$. |
||
ShowTutorialHint (TutorialHint)
Show a tutorial hint to the player |
||
ShowTutorialHint (TutorialHint, Action<Sansar.Script.OperationCompleteEvent>)
Show a tutorial hint to the player |
||
SubscribeToCommand (string, Action<CommandData>, Action<Sansar.Script.CancelData>, bool) : Sansar.Script.IEventSubscription
Subscribes to Command Events. |
||
SubscribeToCommand (string, CommandAction, Action<CommandData>, Action<Sansar.Script.CancelData>, bool) : Sansar.Script.IEventSubscription
Subscribes to Command Events. |
||
TeleportTo (Sansar.Vector, Sansar.Vector)
Teleports to the position facing the specified direction |
||
TeleportToLocation (string, string)
Teleports the personaHandle to the locationHandle. |
||
TeleportToUri (string)
Teleports to the specified URI |
||
override
|
ToString () : string
A string representation of this object. |
|
VibrationPulse (ControlPointType, float, float)
Pulses the vibration haptic motor for a control point. |
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
ClearTutorialHint Method
Clears any scripted tutorial hint being shown to the playerSyntax
[Sansar.Script.Interface]
public void ClearTutorialHint ()Remarks
Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
ClearTutorialHint Method
Clears any scripted tutorial hint being shown to the playerSyntax
[Sansar.Script.Interface]
public void ClearTutorialHint (Action<Sansar.Script.OperationCompleteEvent> handler)Parameters
- handler
- Handler to be called when the event completes.
Remarks
Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
EnableAutomaticTutorialHints Method
Enables / Disables automatic (non-scripted) tutorial hints.Syntax
Parameters
- enabled
- Enabled state of automatic hints.
Remarks
If the user has disabled hints in the settings menu, enabling them from script will have no effect.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
EnableAutomaticTutorialHints Method
Enables / Disables automatic (non-scripted) tutorial hints.Syntax
[Sansar.Script.Interface]
public void EnableAutomaticTutorialHints (bool enabled, Action<Sansar.Script.OperationCompleteEvent> handler)Parameters
- enabled
- Enabled state of automatic hints.
- handler
- Handler to be called when the event completes.
Remarks
If the user has disabled hints in the settings menu, enabling them from script will have no effect.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
OpenQuestCharacterDialog Method
Opens the quest dialog for a character.Syntax
Parameters
- character
- The character to open the quest dialog for.
Remarks
Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
OpenStoreListing Method
Opens the product's Store page.Syntax
Parameters
- productId
- A product ID from a Sansar store listing.
Remarks
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
[Sansar.Script.Interface]
[System.Obsolete("Deprecated. Use AgentPrivate.SendChat or AgentPublic.SendChat", false)]
public void SendChat (string message)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
ShowTutorialHint Method
Show a tutorial hint to the playerSyntax
Parameters
- hint
- The hint to show.
Remarks
Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
ShowTutorialHint Method
Show a tutorial hint to the playerSyntax
[Sansar.Script.Interface]
public void ShowTutorialHint (TutorialHint hint, Action<Sansar.Script.OperationCompleteEvent> handler)Parameters
- hint
- The hint to show.
- handler
- Handler to be called when the event completes.
Remarks
Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
SubscribeToCommand Method
Subscribes to Command Events.Syntax
[Sansar.Script.Interface]
public Sansar.Script.IEventSubscription SubscribeToCommand (string Command, Action<CommandData> callback, Action<Sansar.Script.CancelData> canceled, bool persistent)See Also
Parameters
- Command
- The command which occurred.
- callback
- Callback which is executed when the event completes.
- canceled
- Callback which is executed when the subscription is canceled.
- persistent
- Optional, set to false to unsubscribe after one event.
Returns
An Sansar.Script.IEventSubscription that can be used to cancel the subscription.Remarks
Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
SubscribeToCommand Method
Subscribes to Command Events.Syntax
[Sansar.Script.Interface]
public Sansar.Script.IEventSubscription SubscribeToCommand (string Command, CommandAction Action, Action<CommandData> callback, Action<Sansar.Script.CancelData> canceled, bool persistent)See Also
Parameters
- Command
- The command which occurred.
- Action
- The action which occurred.
- callback
- Callback which is executed when the event completes.
- canceled
- Callback which is executed when the subscription is canceled.
- persistent
- Optional, set to false to unsubscribe after one event.
Returns
An Sansar.Script.IEventSubscription that can be used to cancel the subscription.Remarks
Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
TeleportTo Method
Teleports to the position facing the specified directionSyntax
Parameters
- position
- The teleport destination position.
- forward
- The teleport destination forward direction.
Remarks
The agent will be set to the specified position facing the given forward direction. Note that avatars always remain upright so the Z component of the forward vector will be ignored.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
TeleportToLocation Method
Teleports the personaHandle to the locationHandle.Syntax
Parameters
- avatarId
- The SceneInfo.AvatarId of the destination creator.
- locationHandle
- The SceneInfo.LocationHandle of the destination.
Remarks
Teleports may be throttled.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
TeleportToUri Method
Teleports to the specified URISyntax
Parameters
- sansarUri
- The URI to teleport to.
Remarks
Teleports may be throttled.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
UI Property
Returns the Sansar.Simulation.UI for this instance.Syntax
[get: Sansar.Script.Interface]
public UI UI { get; }Value
The Sansar.Simulation.UI for this instanceRemarks
The Sansar.Simulation.UI for this instance.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
VibrationPulse Method
Pulses the vibration haptic motor for a control point.Syntax
[Sansar.Script.Interface]
public void VibrationPulse (ControlPointType type, float intensity, float duration)Parameters
- type
- See Sansar.Simulation.ControlPointType
- intensity
- Intensity of vibration. Intensity will be clamped to the range [0, 1].
- duration
- Duration of the pulse in milliseconds. Will be clamped to the range [0, 1000].
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
0 Comments