Lifecycle
Understand the Sync Kit lifecycle including connection states, session management, and entity synchronization phases for multiplayer.
- Snapchat: not supported
- SPECS: fully supported
- Camera Kit Web: not supported
- Camera Kit Mobile: not supported
- SnapchatNot supported
- SPECSFully supported
- Camera Kit WebNot supported
- Camera Kit MobileNot supported
The following steps and flowchart describe how Sync Kit sets up a Connected Lenses session and when certain actions are safe to do. When Sync Kit leaves a session and joins again, after a suspension or a call to SessionController.leaveSession(), it runs these steps again; Leaving and Rejoining Sessions describes what changes.
Session Setup Steps
- SessionController is initialized.
- SyncEntities in the scene subscribe to events on SessionController.
✅ It is okay to add storage properties, subscribe to events, and request ownership of SyncEntities.
- Instantiators in the scene are initialized and subscribe to events on SessionController.
- On mapping or relocalization success, SessionController begins to set up the session. When the session setup is finished,
SessionController.getIsReady()becomes true and allSessionController.notifyOnReady()callbacks are executed.
✅ SessionController is now completely ready to use and SessionController APIs can be called.
- All SyncEntities begin to initialize themselves. Depending on the situation, they may initialize immediately, or may take up to a second to initialize. When each SyncEntity is ready and fully initialized, they execute their
SyncEntity.notifyOnReady()callbacks.
✅ SyncEntity is now completely ready to use. Storage properties can be set and retrieved, and networked events can be sent and received.
- When each Instantiator is ready and fully initialized, they execute their
Instantiator.notifyOnReady()callbacks.
✅ Instantiator is now completely ready to use. Prefabs can be instantiated across the network.
Session Setup Flowchart

Key Takeaways
These are the most important points to remember as a developer:
SessionController
- If you need to use SessionController APIs, wait for the
SessionController.notifyOnReady()callback to run, or forSessionController.getIsReady()to return true. - Do session setup in an
onReadylistener, not inOnStartEvent: after a leave,onReadyfires again on a join into another session, whileOnStartEventfires only once per Lens run.
SyncEntity
- If you need to set up a SyncEntity by adding storage properties or callbacks, it is fine to do so at any point.
- If you need to make changes to a SyncEntity (for example, get / set a storage property) or start its behavior, wait for the
SyncEntity.notifyOnReady()callback, or forSyncEntity.isSetupFinishedto return true.
Instantiator
- If you need to instantiate a prefab using the Instantiator, wait for the
Instantiator.notifyOnReady()callback, or forInstantiator.isReady()to return true.