Interaction Class
Syntax
[Sansar.Script.Interface]
public class Interaction : Sansar.Script.InstanceInterface
public class Interaction : Sansar.Script.InstanceInterface
Remarks
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]
|
IsValid | bool . Whether or not this interface is valid. (Inherited from Sansar.Script.InstanceInterface.) |
Public Methods
|
GetEnabled () : bool
Returns true if the interaction is enabled. |
|
|
GetPrompt () : string
Get the current Interaction prompt. |
|
|
SetEnabled (bool)
Change an Interaction state to disabled or enabled. |
|
|
SetEnabled (Sansar.Script.SessionId, bool)
Change an Interaction state to disabled or enabled. |
|
|
SetEnabled (AgentPrivate, bool)
Change an Interaction state to disabled or enabled. |
|
|
SetEnabled (bool, Sansar.Script.ScriptBase.OperationComplete) : ulong
Change an Interaction state to disabled or enabled. |
|
|
SetEnabled (bool, Action<Sansar.Script.OperationCompleteEvent>)
Change an Interaction state to disabled or enabled. |
|
|
SetEnabled (Sansar.Script.SessionId, bool, Action<Sansar.Script.OperationCompleteEvent>)
Change an Interaction state to disabled or enabled. |
|
|
SetEnabled (AgentPrivate, bool, Action<Sansar.Script.OperationCompleteEvent>)
Change an Interaction state to disabled or enabled. |
|
|
SetPrompt (string)
Set the Interaction prompt string. |
|
|
SetPrompt (Sansar.Script.SessionId, string)
Set the Interaction prompt string. |
|
|
SetPrompt (AgentPrivate, string)
Set the Interaction prompt string. |
|
|
SetPrompt (string, Sansar.Script.ScriptBase.OperationComplete) : ulong
Set the Interaction prompt string. |
|
|
SetPrompt (string, Action<Sansar.Script.OperationCompleteEvent>)
Set the Interaction prompt string. |
|
|
SetPrompt (Sansar.Script.SessionId, string, Action<Sansar.Script.OperationCompleteEvent>)
Set the Interaction prompt string. |
|
|
SetPrompt (AgentPrivate, string, Action<Sansar.Script.OperationCompleteEvent>)
Set the Interaction prompt string. |
|
|
Subscribe (Action<InteractionData>, bool) : Sansar.Script.IEventSubscription
Subscribes to Interaction Events. |
Member Details
GetEnabled Method
Returns true if the interaction is enabled.Syntax
[Sansar.Script.Interface]
public bool GetEnabled ()Returns
true if the interaction is enabled.Remarks
Disabled interactions do not highlight, do not show their prompt and cannot be 'clicked'.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
GetPrompt Method
Get the current Interaction prompt.Syntax
[Sansar.Script.Interface]
public string GetPrompt ()Returns
The current prompt string.Remarks
The prompt text shows when hovering over the object the script is on.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
SetEnabled Method
Change an Interaction state to disabled or enabled.Syntax
Parameters
- value
- true to enable the Interaction, false to disable it.
Remarks
All Interactions start off enabled. Disabled interactions do not highlight, do not show their prompt and cannot be 'clicked'.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
SetEnabled Method
Change an Interaction state to disabled or enabled.Syntax
Parameters
- sessionId
- The SessionId of the agent to disable or enable the interaction for..
- value
- true to enable the Interaction, false to disable it.
Remarks
All Interactions start off enabled. Disabled interactions do not highlight, do not show their prompt and cannot be 'clicked'. This method will only change the enabled state for a single user and will not persist across client restarts, server restarts, or leaving the scene (even for changing avatars). It will also be overriden by any global setEnabled calls.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
SetEnabled Method
Change an Interaction state to disabled or enabled.Syntax
Parameters
- agent
- The agent to disable or enable the interaction for.
- value
- true to enable the Interaction, false to disable it.
Remarks
All Interactions start off enabled. Disabled interactions do not highlight, do not show their prompt and cannot be 'clicked'. This method will only change the enabled state for a single user and will not persist across client restarts, server restarts, or leaving the scene (even for changing avatars). It will also be overriden by any global setEnabled calls.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
SetEnabled Method
Change an Interaction state to disabled or enabled.Syntax
[Sansar.Script.Interface]
[System.Obsolete("Deprecated. Use the Action<> overload", false)]
public ulong SetEnabled (bool value, Sansar.Script.ScriptBase.OperationComplete handler)Parameters
- value
- true to enable the Interaction, false to disable it.
- handler
- Handler to be called when the event completes.
Returns
A legacy eventIdRemarks
All Interactions start off enabled. Disabled interactions do not highlight, do not show their prompt and cannot be 'clicked'.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
SetEnabled Method
Change an Interaction state to disabled or enabled.Syntax
[Sansar.Script.Interface]
public void SetEnabled (bool value, Action<Sansar.Script.OperationCompleteEvent> handler)Parameters
- value
- true to enable the Interaction, false to disable it.
- handler
- Handler to be called when the event completes.
Remarks
All Interactions start off enabled. Disabled interactions do not highlight, do not show their prompt and cannot be 'clicked'.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
SetEnabled Method
Change an Interaction state to disabled or enabled.Syntax
[Sansar.Script.Interface]
public void SetEnabled (Sansar.Script.SessionId sessionId, bool value, Action<Sansar.Script.OperationCompleteEvent> handler)Parameters
- sessionId
- The SessionId of the agent to disable or enable the interaction for..
- value
- true to enable the Interaction, false to disable it.
- handler
- Handler to be called when the event completes.
Remarks
All Interactions start off enabled. Disabled interactions do not highlight, do not show their prompt and cannot be 'clicked'. This method will only change the enabled state for a single user and will not persist across client restarts, server restarts, or leaving the scene (even for changing avatars). It will also be overriden by any global setEnabled calls.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
SetEnabled Method
Change an Interaction state to disabled or enabled.Syntax
[Sansar.Script.Interface]
public void SetEnabled (AgentPrivate agent, bool value, Action<Sansar.Script.OperationCompleteEvent> handler)Parameters
- agent
- The agent to disable or enable the interaction for.
- value
- true to enable the Interaction, false to disable it.
- handler
- Handler to be called when the event completes.
Remarks
All Interactions start off enabled. Disabled interactions do not highlight, do not show their prompt and cannot be 'clicked'. This method will only change the enabled state for a single user and will not persist across client restarts, server restarts, or leaving the scene (even for changing avatars). It will also be overriden by any global setEnabled calls.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
SetPrompt Method
Set the Interaction prompt string.Syntax
Parameters
- prompt
- The string to set the prompt to.
Remarks
The prompt text shows when hovering over the object the script is on. The prompt must be 128 characters or less and 4 lines or less. Use Sansar.Script.DefaultValueAttribute to set a default prompt.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
SetPrompt Method
Set the Interaction prompt string.Syntax
Parameters
- sessionId
- The sessionId of the user to change the prompt for.
- prompt
- The string to set the prompt to.
Remarks
The prompt text shows when hovering over the object the script is on. The prompt must be 128 characters or less and 4 lines or less. Will only change the prompt for a single user and will not persist across client restarts, server restarts, or leaving the scene (even for changing avatars). It will also be overriden by any global setPrompt calls.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
SetPrompt Method
Set the Interaction prompt string.Syntax
Parameters
- agent
- The agent to change the prompt for.
- prompt
- The string to set the prompt to.
Remarks
The prompt text shows when hovering over the object the script is on. The prompt must be 128 characters or less and 4 lines or less. Will only change the prompt for a single user and will not persist across client restarts, server restarts, or leaving the scene (even for changing avatars). It will also be overriden by any global setPrompt calls.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
SetPrompt Method
Set the Interaction prompt string.Syntax
[Sansar.Script.Interface]
[System.Obsolete("Deprecated. Use the Action<> overload", false)]
public ulong SetPrompt (string prompt, Sansar.Script.ScriptBase.OperationComplete handler)Parameters
- prompt
- The string to set the prompt to.
- handler
- Handler to be called when the event completes.
Returns
A legacy eventIdRemarks
The prompt text shows when hovering over the object the script is on. The prompt must be 128 characters or less and 4 lines or less. Use Sansar.Script.DefaultValueAttribute to set a default prompt.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
SetPrompt Method
Set the Interaction prompt string.Syntax
[Sansar.Script.Interface]
public void SetPrompt (string prompt, Action<Sansar.Script.OperationCompleteEvent> handler)Parameters
- prompt
- The string to set the prompt to.
- handler
- Handler to be called when the event completes.
Remarks
The prompt text shows when hovering over the object the script is on. The prompt must be 128 characters or less and 4 lines or less. Use Sansar.Script.DefaultValueAttribute to set a default prompt.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
SetPrompt Method
Set the Interaction prompt string.Syntax
[Sansar.Script.Interface]
public void SetPrompt (Sansar.Script.SessionId sessionId, string prompt, Action<Sansar.Script.OperationCompleteEvent> handler)Parameters
- sessionId
- The sessionId of the user to change the prompt for.
- prompt
- The string to set the prompt to.
- handler
- Handler to be called when the event completes.
Remarks
The prompt text shows when hovering over the object the script is on. The prompt must be 128 characters or less and 4 lines or less. Will only change the prompt for a single user and will not persist across client restarts, server restarts, or leaving the scene (even for changing avatars). It will also be overriden by any global setPrompt calls.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
SetPrompt Method
Set the Interaction prompt string.Syntax
[Sansar.Script.Interface]
public void SetPrompt (AgentPrivate agent, string prompt, Action<Sansar.Script.OperationCompleteEvent> handler)Parameters
- agent
- The agent to change the prompt for.
- prompt
- The string to set the prompt to.
- handler
- Handler to be called when the event completes.
Remarks
The prompt text shows when hovering over the object the script is on. The prompt must be 128 characters or less and 4 lines or less. Will only change the prompt for a single user and will not persist across client restarts, server restarts, or leaving the scene (even for changing avatars). It will also be overriden by any global setPrompt calls.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
Subscribe Method
Subscribes to Interaction Events.Syntax
[Sansar.Script.Interface]
public Sansar.Script.IEventSubscription Subscribe (Action<InteractionData> callback, bool persistent)See Also
Parameters
- callback
- Callback which is executed when the event completes.
- 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
0 Comments