Connected Lenses (Multiplayer)
Multiplayer sessions, realtime stores, and colocated tracking.
Commonly used
ConnectedLensModuleEnables the creation and management of networked Lens experiences, allowing for real-time communication and interaction between users through Connected Lenses.MultiplayerSessionAn instance of a Connected Lens session among a group of participants who were successfully invited into the experience.RealtimeStoreCreateOptions
Guides
Connected Lenses ExampleThe Connected Lenses Module allows a Lens to invite other people into the same Multiplayer Session where data can be shared.LifecycleA Connected Lens is able to receive and send information to other Snapchatters by being connected to a "session." It is important to keep in mind that users must voluntarily joi…Sync FrameworkSync Framework is a set of scripts and components designed to help you make Connected Lenses for building shared online multiplayer experiences, both synchronous and asynchronou…Sharing Data Between ParticipantsLens Studio provides several APIs to enable users to pass data between participants in a multiplayer Lens session (that is, Connected Lens).How Connected Lenses WorkConnected Lenses allow you to create AR experiences that friends can experience together at the same time, and return to over time.Multiplayer ExamplePersistent Cloud Storage can be shared in a multiplayer session by passing in the MultiplayerSession provided by the ConnectedLensModule to allow multiple participants to access…
All APIs in this topic
Add components to a scene object, reference assets and other modules with a script input, and create events with script.createEvent('<name>').
Components, assets, and modules
| API | Description |
|---|---|
| ColocatedTrackingComponent | Allows SceneObject to be tracked in a Connected Lens Experience. |
| ConnectedLensModule | Enables the creation and management of networked Lens experiences, allowing for real-time communication and interaction between users through Connected Lenses. |
Events
| API | Description |
|---|---|
| ConnectedLensEnteredEvent | Event fired when the "Launch connected lens" button was pressed. |
Objects and data
| API | Description |
|---|---|
| BaseMultiplayerSessionOptions | |
| ColocatedLandmarks2DRenderObjectProvider | Not usable from JS. |
| ColocatedLandmarks3DRenderObjectProvider | Not usable from JS. |
| ColocatedLandmarksRenderObjectProviderBase | |
| ConnectedLensSessionOptions | Settings for configuring a Connected Lens session. |
| DirectMultiplayerSessionOptions | |
| MultiplayerSession | An instance of a Connected Lens session among a group of participants who were successfully invited into the experience. |
| RealtimeStoreCreateOptions | |
| StorageOptions | Settings for saving values in a MultiplayerSession. |
Related topics
Cloud, Networking & Storage › StorageData kept on the device between sessions, and cloud storage shared across users or locations.User & FriendsThe current user and friends, user context and activity, and leaderboards.Graphics, Materials & Particles › Textures & VideoTexture assets and providers, video playback and recording, and media pickers.