Lens Scripting API

    Class RealtimeStoreCreateOptions

    The options for the realtime store.

    // @input Asset.ConnectedLensModule connectedLensModule

    var options = ConnectedLensSessionOptions.create();
    script.connectedLensModule.createSession(options)

    var initialStore = GeneralDataStore.create();
    initialStore.putInt('state', 1);

    var options = RealtimeStoreCreateOptions.create();
    options.ownership = RealtimeStoreCreateOptions.Ownership.Unowned;
    options.persistence = RealtimeStoreCreateOptions.Persistence.Session;
    options.initialStore = initialStore;

    session.createRealtimeStore(options,
    function onSuccess(store) {
    print('Store created! In On connected');

    },
    function onError(message) {
    print('Unable to create a store: ' + message)
    }
    )

    Hierarchy (View Summary, Expand)

    Index

    Constructors

    Properties

    allowOwnershipTakeOver: boolean
    initialStore: GeneralDataStore

    An existing store to be used as the initial values for the real time store.

    ownership: Ownership

    The ownership model for the realtime store.

    persistence: Persistence

    The persistence model for the realtime store.

    storeId: string

    Writes an id string to the store that can be used to identify it later.

    Methods

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

      Parameters

      Returns boolean

    MMNEPVFCICPMFPCPTTAAATR