Skip to main content
Supported on
Snapchat

Sync Helpers

Four small components that cover jobs you would otherwise write a script for: showing an object once the network is ready, showing different objects to the owner, rendering a synced value into text, and inspecting an entity while debugging.


Set Enabled On Ready

Enables one set of objects once its target is ready and a different set before then. Use it so gameplay UI does not appear before the session can serve it.

NameTypeDescription
Target TypeSync Entity or Network RootWhat readiness is measured against. Defaults to Sync Entity.
Sync Entity ScriptScriptComponentShown when Target Type is Sync Entity. The script whose entity to watch.
Ready ObjectsSceneObject[]Enabled once ready.
Not Ready ObjectsSceneObject[]Enabled until ready.

Despite the label, Network Root gates on the Session Controller being ready, not on a network root. Pick it when you mean "wait for the session," and Sync Entity when you mean "wait for this specific entity."


Set Enabled If Owner

Enables one set of objects for the client that owns the entity and a different set for everyone else. This is how you give the owner a control UI while remote clients see only the visuals.

NameTypeDescription
Target TypeSync Entity or Network RootWhat ownership is read from. Defaults to Sync Entity.
Sync Entity ScriptScriptComponentShown when Target Type is Sync Entity.
Owner ObjectsSceneObject[]Enabled for the owner.
Non Owner ObjectsSceneObject[]Enabled for everyone else.

It re-evaluates when ownership changes, so it keeps up if the owner leaves and another client takes over.


Display Storage Property

Renders a storage property into a Text component, with an optional format string. Useful for a score or timer readout with no glue code.

NameTypeDescription
Sync Entity ScriptScriptComponentThe script whose entity holds the property.
Property KeystringThe property key to display.
TextTextThe text component to write into.
Use FormatbooleanEnables the format string. Defaults to false.
Format StringstringShown when Use Format is on. Supports {value} for the current value and {prevValue} for the previous one; either is blank when unset.
Alt TextstringShown when the value is undefined.

Sync Entity Debug

Writes an entity's network id, owner, and full store contents into Text components. A debugging aid, not something to ship.

NameTypeDescription
Target TypeSync Entity or Network RootWhich target to inspect. Defaults to Sync Entity.
Sync Entity ScriptScriptComponentShown when Target Type is Sync Entity.
Network Id TextText (optional)Receives the network id.
Owner Display Name TextText (optional)Receives the owner's display name.
Show Only First NamebooleanTrims the owner name to the first name.
Owner Id TextText (optional)Receives the owner id.
Storage Property TextText (optional)Receives the full store contents.

This component prints session and user information on screen. Disable or delete it before you publish, the same way the starter project marks its debug camera [DISABLE ME].

Was this page helpful?
Yes
No