A utility for the stateful syncing of specific data from your plugin

<aside> ℹ️ You can also transmit custom data to other clients using an InstantMessageHandler, see the InstantMessageHandler page for more information, and to learn how they differ from PluginSyncables

</aside>

The state of ViRSE’s components, such as InfoPoints, Activatables, and Grabbables, as well as player positions, are all synced automatically. It is important to note that only the current state of this data is transmitted. This means you have to manually sync any data that either relates to the history of your world, or isn’t captured by one of ViRSE components

A V_NetworkObject can be attached to a GameObject, allowing you to sync any custom data you like between all clients in the instance. Data can be passed to the V_NetworkObject’s UpdateData function in the form of an object, and this data will be received by that same V_NetworkObject on the other clients, and emitted in the OnDataChange event found on the V_NetworkObject’s inspector.

<aside> ⚠️ Data received from a V_NetworkObject must be cast back into the exact format it was sent in in order for it to be handled in your code. For example, if you pass the V_NetworkObject a list of strings, you need to cast the object emitted by the V_NetworkObject back into a list of strings!

</aside>

Code Example

Inspector Properties

Sync Settings

Note: These settings will only appear if a V_InstanceIntegration component is present in the scene. Without these, all components will be non-networked.