User Data
User Class
The User class handles interactions user logins and logoffs.
Syntax
Member Details
AddUser Field
For subscribing to events for users entering the scene
Syntaxpublic static readonly string AddUser
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
RemoveUser Field
For subscribing to events for users leaving the scene
Syntaxpublic static readonly string RemoveUser
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Subscribe Method
Subscribes to User Events.
Syntax[Sansar.Script.Interface] [System.Obsolete("Use subscription callbacks of type Action<Sansar.Simulation.UserData>", false)] public void Subscribe (string Action, User.SubscriptionHandler callback, bool persistent)
Parameters
Action
string action of the event: AddUser, RemoveUser
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
Subscribe Method
Subscribes to User Events.
SyntaxSee Also
Parameters
Action
string action of the event: AddUser, RemoveUser
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
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Subscribe Method
Subscribes to User Events.
SyntaxParameters
Action
string action of the event: AddUser, RemoveUser
User
Sansar.Script.SessionId for the user.
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
Subscribe Method
Subscribes to User Events.
SyntaxSee Also
Parameters
Action
string action of the event: AddUser, RemoveUser
User
Sansar.Script.SessionId for the user.
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
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
User.SubscriptionHandler Delegate
Subscribe to receive events when users enter or leave the experience, or change their chat name.
Syntax
[Sansar.Script.Interface] [System.Obsolete("Use subscription callbacks of type Action<Sansar.Simulation.UserData>", false)] public delegate void User.SubscriptionHandler (string Action, Sansar.Script.SessionId User, string Data)
Parameters
Action
string action of the event: AddUser, RemoveUser
User
Sansar.Script.SessionId for the user.
Data
Deprecated.
Remarks
Requirements
Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
UserData Class
Subscribe to receive events when users enter or leave the experience.
Syntax
Member Details
Action Property
string action of the event: AddUser, RemoveUser
Syntax[get: Sansar.Script.Interface] public string Action { get; }
Value
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Data Property
Deprecated.
Syntax[get: Sansar.Script.Interface] public string Data { get; }
Value
Remarks
RequirementsNamespace: 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
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
User Property
Sansar.Script.SessionId for the user.
SyntaxValue
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Last updated