Preparing search index...
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    callbacks: {
        onConnected: EventWrapper<
            [session: MultiplayerSession, connectionInfo: ConnectionInfo],
        >;
        onConnectionFailed: EventWrapper<[string, string]>;
        onDisconnected: EventWrapper<
            [session: MultiplayerSession, disconnectInfo: string],
        >;
        onError: EventWrapper<
            [session: MultiplayerSession, code: string, description: string],
        >;
        onHostUpdated: EventWrapper<
            [session: MultiplayerSession, removalInfo: HostUpdateInfo],
        >;
        onLocatedAtFound: EventWrapper<[]>;
        onLocationId: EventWrapper<[]>;
        onMapExists: EventWrapper<[]>;
        onMessageReceived: EventWrapper<
            [
                session: MultiplayerSession,
                userId: string,
                message: string,
                senderInfo: UserInfo,
            ],
        >;
        onReady: EventWrapper<[]>;
        onRealtimeStoreCreated: EventWrapper<
            [
                session: MultiplayerSession,
                store: GeneralDataStore,
                ownerInfo: UserInfo,
                creationInfo: RealtimeStoreCreationInfo,
            ],
        >;
        onRealtimeStoreDeleted: EventWrapper<
            [
                session: MultiplayerSession,
                store: GeneralDataStore,
                deleteInfo: RealtimeStoreDeleteInfo,
            ],
        >;
        onRealtimeStoreKeyRemoved: EventWrapper<
            [
                session: MultiplayerSession,
                store: GeneralDataStore,
                removalInfo: RealtimeStoreKeyRemovalInfo,
            ],
        >;
        onRealtimeStoreOwnershipUpdated: EventWrapper<
            [
                session: MultiplayerSession,
                store: GeneralDataStore,
                ownerInfo: UserInfo,
                ownershipUpdateInfo: RealtimeStoreOwnershipUpdateInfo,
            ],
        >;
        onRealtimeStoreUpdated: EventWrapper<
            [
                session: MultiplayerSession,
                store: GeneralDataStore,
                key: string,
                updateInfo: RealtimeStoreUpdateInfo,
            ],
        >;
        onSessionCreated: EventWrapper<[MultiplayerSession, SessionCreationType]>;
        onSessionShared: EventWrapper<[MultiplayerSession]>;
        onStartColocated: EventWrapper<[]>;
        onUserJoinedSession: EventWrapper<
            [session: MultiplayerSession, userInfo: UserInfo],
        >;
        onUserLeftSession: EventWrapper<
            [session: MultiplayerSession, userInfo: UserInfo],
        >;
    } = ...
    connectedLensModuleToUse: ConnectedLensModule = null
    customLandmark: LocationAsset = null
    deviceTrackingComponent: DeviceTracking = ...
    eventFlowState: {
        connected: boolean;
        inviteSent: boolean;
        isColocatedSetupFinished: boolean;
        isColocatedSetupStarted: boolean;
        isWaitingForSessionScopedStore: boolean;
        isWaitingForSessionStore: boolean;
        shared: boolean;
    } = ...
    getInstance: () => SessionController
    isColocated: boolean = null
    isConfigured: boolean = false
    locatedAtComponent: LocatedAtComponent = null
    locationCloudStorageModule: LocationCloudStorageModule = null
    onConnected: EventWrapper<
        [session: MultiplayerSession, connectionInfo: ConnectionInfo],
    > = ...
    onConnectionFailed: EventWrapper<[string, string]> = ...
    onDisconnected: EventWrapper<
        [session: MultiplayerSession, disconnectInfo: string],
    > = ...
    onError: EventWrapper<
        [session: MultiplayerSession, code: string, description: string],
    > = ...
    onHostUpdated: EventWrapper<
        [session: MultiplayerSession, removalInfo: HostUpdateInfo],
    > = ...
    onLocatedAtFound: EventWrapper<[]> = ...
    onLocationId: EventWrapper<[]> = ...
    onMapExists: EventWrapper<[]> = ...
    onMessageReceived: EventWrapper<
        [
            session: MultiplayerSession,
            userId: string,
            message: string,
            senderInfo: UserInfo,
        ],
    > = ...
    onReady: EventWrapper<[]> = ...
    onRealtimeStoreCreated: EventWrapper<
        [
            session: MultiplayerSession,
            store: GeneralDataStore,
            ownerInfo: UserInfo,
            creationInfo: RealtimeStoreCreationInfo,
        ],
    > = ...
    onRealtimeStoreDeleted: EventWrapper<
        [
            session: MultiplayerSession,
            store: GeneralDataStore,
            deleteInfo: RealtimeStoreDeleteInfo,
        ],
    > = ...
    onRealtimeStoreKeyRemoved: EventWrapper<
        [
            session: MultiplayerSession,
            store: GeneralDataStore,
            removalInfo: RealtimeStoreKeyRemovalInfo,
        ],
    > = ...
    onRealtimeStoreOwnershipUpdated: EventWrapper<
        [
            session: MultiplayerSession,
            store: GeneralDataStore,
            ownerInfo: UserInfo,
            ownershipUpdateInfo: RealtimeStoreOwnershipUpdateInfo,
        ],
    > = ...
    onRealtimeStoreUpdated: EventWrapper<
        [
            session: MultiplayerSession,
            store: GeneralDataStore,
            key: string,
            updateInfo: RealtimeStoreUpdateInfo,
        ],
    > = ...
    onSessionShared: EventWrapper<[MultiplayerSession]> = ...
    onStartColocated: EventWrapper<[]> = ...
    onUserJoinedSession: EventWrapper<
        [session: MultiplayerSession, userInfo: UserInfo],
    > = ...
    onUserLeftSession: EventWrapper<
        [session: MultiplayerSession, userInfo: UserInfo],
    > = ...
    script: BaseScriptComponent = null
    shouldInitialize: boolean = false
    skipCustomLandmarkInLensStudio: boolean = null
    startMode: StartMode = null
    worldCamera: WorldCameraFinderProvider = ...

    Methods

    • Returns ColocatedBuildStatus

      The colocated build status if set manually, null otherwise.

      • this is no longer needed as getNearbyLocationStores handles colocated build logic. onMapExists is now triggered by getNearbyLocationStores - use getMapExists instead to check if a map has been retrieved.
    • Returns string

      The colocated map id.

      • this is no longer needed & will not be set by default as getNearbyLocationStores handles map retrieval. Get the id of the colocated map.
    • Returns the custom landmark being using, or null if not set.

      Returns LocationAsset

      The custom landmark being using, or null if not set.

    • Returns the colocated tracking component.

      Returns DeviceTracking

      The colocated tracking component.

    • Returns the host connection id, or null.

      Returns string

      The host connection id or null.

    • Returns the host user id, or null.

      Returns string

      The host user id or null.

    • Returns the host user info, or null.

      Returns UserInfo

      The host user info or null.

    • Returns the host display name, or null.

      Returns string

      The host display name or null.

    • Checks if the current connection is the first joiner of the session.

      Returns boolean

      True if the current connection is the first joiner of the session.

    • Returns true if the session has finished setting up and the lens experience is ready to start.

      Returns boolean

      True if the session has finished setting up and the lens experience is ready to start.

    • Returns true if the session has been shared.

      Returns boolean

      True if the session has been shared.

    • Returns the local connection id, or null.

      Returns string

      The local connection id or null.

    • Returns the local user id, or null.

      Returns string

      The local user id or null.

    • Returns the local user info, or null.

      Returns UserInfo

      The local user info or null.

    • Returns the local display name, or null.

      Returns string

      The local display name or null.

    • Returns true if the map exists.

      Returns boolean

      True if the map exists.

    • Returns true if we're ready to start the colocated tracking flow.

      Returns boolean

      True if we're ready to start the colocated tracking flow.

    • Returns a unix timestamp in seconds of the current time according to the server. Useful for synchronizing time-based game events across devices. -1 will be returned if session is not connected to the server.

      Returns number

      The unix timestamp in seconds of the current time according to the server.

    • Returns the shared session store (if exists) or null. Useful for needed session info like colocated build status.

      Returns GeneralDataStore

      The shared session store or null.

    • Get the current start mode. Start Menu - Will show the start menu when the lens starts Multiplayer - Will launch into multiplayer when the lens starts Off - Will not show the start menu and will not launch into multiplayer. Use startWithStartMenu or startMultiplayer when ready.

      Returns string

      The current start mode.

    • Returns the current state.

      Returns State

      The current state.

    • Returns StoreInfo for the store with matching id.

      Parameters

      • networkId: string

        The network id.

      Returns StoreInfo

      StoreInfo for the store with matching id.

    • Gets the tracked stores.

      Returns StoreInfo[]

      The tracked stores.

    • Returns the user info with matching connection id, or null.

      Parameters

      • connectionId: string

        The connection id.

      Returns UserInfo

      The user info with matching connection id, or null.

    • Returns the list of current user connections.

      Returns UserInfo[]

      The list of current user connections.

    • Returns the list of users with matching user id.

      Parameters

      • userId: string

        The user id.

      Returns UserInfo[]

      The list of users with matching user id.

    • Returns void

    • Returns true if the local user is the host, or null if the session doesn't exist yet.

      Returns boolean

      True if the local user is the host, or null if the session doesn't exist yet.

    • Returns true if the passed in userInfo matches the host user and connection.

      Parameters

      • userInfo: UserInfo

        The user info to check.

      Returns boolean

      True if the user info matches the host user and connection.

    • Returns true if the passed in userInfo matches the local user and connection.

      Parameters

      • userInfo: UserInfo

        The user info to check.

      Returns boolean

      True if the user info matches the local user and connection.

    • Returns true if the passed in userInfo matches the host userId. Note that this is separate from connectionId.

      Parameters

      • userInfo: UserInfo

        The user info to check.

      Returns boolean

      True if the user info matches the host userId.

    • Returns true if the passed in userInfo matches the local userId. Note that this is separate from connectionId.

      Parameters

      • userInfo: UserInfo

        The user info to check.

      Returns boolean

      True if the user info matches the local userId.

    • Returns true if the session is singleplayer.

      Returns boolean

      Whether the session is singleplayer.

    • Executes onLocatedAtFound immediately if the locatedAtComponent is found, or will execute it later when the component is found.

      Parameters

      • onLocatedAtFound: () => void

        Callback for when the locatedAtComponent is found.

      Returns void

    • Parameters

      • onLocationId: () => void

        Callback for when the locationId is found.

      Returns void

      • this is no longer needed as getNearbyLocationStores now handles location retrieval logic. locationId is no longer used and will not be set by default. Executes onLocationId immediately if the locationId is found.
    • Executes onMapExists immediately if the map exists.

      Parameters

      • onMapExists: () => void

        Callback for when the map exists.

      Returns void

    • Executes onReady immediately if the Session is ready, or will execute it later when the Session becomes ready.

      Parameters

      • onReady: () => void

        Callback for when the session is ready.

      Returns void

    • Executes the onStartColocated callback immediately if the Session's colocated setup has already begun. If not, onStartColocated will be called when colocated setup starts later on.

      Parameters

      • onStartColocated: () => void

        Callback for starting colocation.

      Returns void

    • Parameters

      Returns void

      • this is no longer needed as getNearbyLocationStores handles colocated build logic.
    • Parameters

      • value: string

        The map id.

      Returns void

      • this is no longer needed as getNearbyLocationStores handles map retrieval. Write the id of the colocated map.
    • Sets whether the current connection is the first joiner of the session.

      Parameters

      • isConnectionFirstJoiner: boolean

        Whether the current connection is the first joiner of the session.

      Returns void

    • Share an Invite to the session.

      Returns void

    • Starts the session directly into Multiplayer mode. This will not show the start menu, but will show error messages if any issues occur. Will automatically retry at intervals if the connection fails.

      Returns void

    • Starts the session with the start menu, allowing the user to select Multiplayer or Singleplayer.

      Returns void