Protected
constructorProvides a single host for every session. Useful when an experience has a single authority. This should not be used in latency sensitive situations. The creator of the session will by default be the host. If the host leaves, thee server will determine a new host and transfer all ownership of entities owned by the original host. Use with onHostUpdated
API to get a callback.
Defines maximum number of receipients that a user of connected lens can select while sharing a connected lens session via Invitation flow.
Function to be called when a connection to the realtime backend is established. All realtime requests can be called after this callback. When you invite others to join, a new session will be created, hence you should update your session handler with the argument passed in this callback.
Function to be called when the connection to the realtime backend is lost, either via successful disconnect or passive disconnect due to error.
Function to be called when an error occurs in the session life cycle.
Function to be called when a string-based message sent by sendMessage() is received from another user via the realtime backend.
Callback function that will be executed when a realtime store is created.
Callback function that will be executed when a realtime store is deleted.
Function to be called when a key is removed from a RealtimeStore.
Callback function that will be executed when ownership of a realtime store is updated.
Callback function that will be executed when a realtime store is updated.
Function called when the session is created. The session creation type in this callback can be used to tell if the session is being created from scratch, or is being received from another user.
Function to be called when another user joins the session. When joining a session, the current user will get a callback for each of the existing active users in the current session. This way you can build a list of existing players in game.
Function to be called when another user leaves the session, either deliberately or via passive disconnect due to error.
Static
createCreate a new ConnectedLensesOptions object.
Returns the name of this object's type.
Returns true if the object matches or derives from the passed in type.
Returns true if this object is the same as other
. Useful for checking if two references point to the same thing.
Settings for configuring a Connected Lens session.
Example