Sync Property
For synchronizing not frequently updated GameObject States
Create Sync Property
Sync Properties are created in the Unity Editor Inspector by clicking the Add Sync Property button.
You can have up to 250 Sync Properties in one Sync Property Agent.
Maximum message size of a syncProperty is 4KB.
Events
Modify and Read Sync Property
Sync Properties can be modified by calling SWNetwork API in C# scripts
SyncPropertyAgent Class
Modify Sync Property
Get Sync Property
SWSyncedProperty Class
Read Sync property values
Example
In this example, an Int Synced Property of name "hp" is modified.
To get updates when a SyncProperty is modified, you can add a handler to the OnValueChange event of the SyncProperty.
Last updated