Chat
Chat, subscription handler, and data docs
Last updated
Chat, subscription handler, and data docs
Last updated
The Chat class handles chat subscriptions and sending messages to users and other scripts.
Syntax[Sansar.Script.Interface] [System.Obsolete("All channel subscription no longer allowed", false)] public static readonly AllChannels
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Syntaxpublic static readonly DefaultChannel
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Send a chat message to every user in the Experience.
SyntaxParameters
message
The message to send.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Send a chat message to every user in the Experience.
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
Send a string message to a specific script.
SyntaxParameters
message
The message to send.
scriptId
The id of the script to send the message to.
channel
The channel to send the message on.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Indicates that the chat message originated from a script.
Syntax
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Indicates that the chat message originated from the server.
Syntax
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Subscribes to Chat Events.
SyntaxSee Also
Parameters
SourceScriptId
callback
Callback which is executed when the event completes.
persistent
Optional, set to false to unsubscribe after one event.
Returns
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Subscribes to Chat Events.
SyntaxSee Also
Parameters
SourceId
callback
Callback which is executed when the event completes.
persistent
Optional, set to false to unsubscribe after one event.
Returns
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Subscribes to Chat Events.
SyntaxSee Also
Parameters
Channel
int channel which the chat occurs on.
callback
Callback which is executed when the event completes.
persistent
Optional, set to false to unsubscribe after one event.
Returns
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Subscribes to Chat Events.
SyntaxSee Also
Parameters
Source
string source of the chat: system, user or script.
callback
Callback which is executed when the event completes.
persistent
Optional, set to false to unsubscribe after one event.
Returns
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Subscribes to Chat Events.
SyntaxSee Also
Parameters
Channel
int channel which the chat occurs on.
SourceScriptId
callback
Callback which is executed when the event completes.
persistent
Optional, set to false to unsubscribe after one event.
Returns
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Subscribes to Chat Events.
SyntaxSee Also
Parameters
Channel
int channel which the chat occurs on.
SourceId
callback
Callback which is executed when the event completes.
persistent
Optional, set to false to unsubscribe after one event.
Returns
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Subscribes to Chat Events.
SyntaxParameters
Channel
int channel which the chat occurs on.
Source
string source of the chat: system, user or script.
callback
Callback which is executed when the event completes.
persistent
Optional, set to false to unsubscribe after one event.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Subscribes to Chat Events.
SyntaxSee Also
Parameters
Channel
int channel which the chat occurs on.
Source
string source of the chat: system, user or script.
callback
Callback which is executed when the event completes.
persistent
Optional, set to false to unsubscribe after one event.
Returns
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Subscribes to Chat Events.
SyntaxSee Also
Parameters
Source
string source of the chat: system, user or script.
SourceScriptId
callback
Callback which is executed when the event completes.
persistent
Optional, set to false to unsubscribe after one event.
Returns
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Subscribes to Chat Events.
SyntaxSee Also
Parameters
Source
string source of the chat: system, user or script.
SourceId
callback
Callback which is executed when the event completes.
persistent
Optional, set to false to unsubscribe after one event.
Returns
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Subscribes to Chat Events.
SyntaxParameters
Channel
int channel which the chat occurs on.
Source
string source of the chat: system, user or script.
SourceScriptId
callback
Callback which is executed when the event completes.
persistent
Optional, set to false to unsubscribe after one event.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Subscribes to Chat Events.
SyntaxSee Also
Parameters
Channel
int channel which the chat occurs on.
Source
string source of the chat: system, user or script.
SourceScriptId
callback
Callback which is executed when the event completes.
persistent
Optional, set to false to unsubscribe after one event.
Returns
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Subscribes to Chat Events.
SyntaxParameters
Channel
int channel which the chat occurs on.
Source
string source of the chat: system, user or script.
SourceId
callback
Callback which is executed when the event completes.
persistent
Optional, set to false to unsubscribe after one event.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Subscribes to Chat Events.
SyntaxSee Also
Parameters
Channel
int channel which the chat occurs on.
Source
string source of the chat: system, user or script.
SourceId
callback
Callback which is executed when the event completes.
persistent
Optional, set to false to unsubscribe after one event.
Returns
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Subscribes to Chat Events.
SyntaxParameters
Channel
int channel which the chat occurs on.
Source
string source of the chat: system, user or script.
SourceId
SourceScriptId
callback
Callback which is executed when the event completes.
persistent
Optional, set to false to unsubscribe after one event.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Subscribes to Chat Events.
SyntaxSee Also
Parameters
Channel
int channel which the chat occurs on.
Source
string source of the chat: system, user or script.
SourceId
SourceScriptId
callback
Callback which is executed when the event completes.
persistent
Optional, set to false to unsubscribe after one event.
Returns
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Indicates that the chat message originated from a user.
Syntax
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Subscribe to receive events on chat messages from the system, users or scripts.
Parameters
Channel
int channel which the chat occurs on.
Source
string source of the chat: system, user or script.
SourceId
SourceScriptId
Message
string message of the chat event.
Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Subscribe to receive events on chat messages from the system, users or scripts.
int channel which the chat occurs on.
SyntaxValue
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
string message of the chat event.
SyntaxValue
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
string source of the chat: system, user or script.
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
SyntaxValue
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
[Sansar.Script.Interface] public MessageAllUsers ( message)
public static readonly Script
public static readonly Server
Sansar.Script.ScriptId id of the chat source. May be if the source is not a script.
An that can be used to cancel the subscription.
Sansar.Script.SessionId id of the chat source. May be if the source is not an agent.
An that can be used to cancel the subscription.
An that can be used to cancel the subscription.
An that can be used to cancel the subscription.
Sansar.Script.ScriptId id of the chat source. May be if the source is not a script.
An that can be used to cancel the subscription.
Sansar.Script.SessionId id of the chat source. May be if the source is not an agent.
An that can be used to cancel the subscription.
[Sansar.Script.Interface] [System.Obsolete("Use subscription callbacks of type Action<Sansar.Simulation.ChatData>", false)] public Subscribe ( Channel, Source, callback, persistent)
An that can be used to cancel the subscription.
Sansar.Script.ScriptId id of the chat source. May be if the source is not a script.
An that can be used to cancel the subscription.
Sansar.Script.SessionId id of the chat source. May be if the source is not an agent.
An that can be used to cancel the subscription.
[Sansar.Script.Interface] [System.Obsolete("Use subscription callbacks of type Action<Sansar.Simulation.ChatData>", false)] public Subscribe ( Channel, Source, SourceScriptId, callback, persistent)
Sansar.Script.ScriptId id of the chat source. May be if the source is not a script.
Sansar.Script.ScriptId id of the chat source. May be if the source is not a script.
An that can be used to cancel the subscription.
[Sansar.Script.Interface] [System.Obsolete("Use subscription callbacks of type Action<Sansar.Simulation.ChatData>", false)] public Subscribe ( Channel, Source, SourceId, callback, persistent)
Sansar.Script.SessionId id of the chat source. May be if the source is not an agent.
Sansar.Script.SessionId id of the chat source. May be if the source is not an agent.
An that can be used to cancel the subscription.
Sansar.Script.SessionId id of the chat source. May be if the source is not an agent.
Sansar.Script.ScriptId id of the chat source. May be if the source is not a script.
Sansar.Script.SessionId id of the chat source. May be if the source is not an agent.
Sansar.Script.ScriptId id of the chat source. May be if the source is not a script.
An that can be used to cancel the subscription.
public static readonly User
Sansar.Script.SessionId id of the chat source. May be if the source is not an agent.
Sansar.Script.ScriptId id of the chat source. May be if the source is not a script.
[get: Sansar.Script.Interface] public Channel { get; }
[get: Sansar.Script.Interface] public Message { get; }
[get: Sansar.Script.Interface] public Source { get; }
[Sansar.Script.Interface] public override ToString ()