Sync subset for PrefsGUI over Mirror
MIT License
Synchronization subset for PrefsGUI over Mirror.
Edit > ProjectSettings... > Package Manager > Scoped Registries
Enter the following and click the Save button.
"name": "fuqunaga",
"url": "https://registry.npmjs.com",
"scopes": [ "ga.fuquna" ]
Window > Package Manager
Select MyRegistries
in Packages:
Select PrefsGUISync For Mirror
and click the Install button
Put Packages/PrefsGUISync For Mirror/Runtime/PrefsGUISync.prefab
to the scene.
PrefsGUISyncForMirror component inherits from NetworkBehaivour, so take steps to make it work(call Spawn()
or put it on the online scene).
Now all prefs
are automatically synchronized between the server and client!
prefs
Disable sync toggle at the EditorWindow(See the section below).
or set prefs
's key to PrefsGUISyncForMirror.ignoreKeyList
.
Window > PrefsGUI
You can set whether to synchronize with the sync toggle.
prefs
PrefsGUISyncForMirror
only sends prefs
that have changed from their default values.prefs
for the same key on the server and client share the same default values.false
, all prefs
values will be sent.PrefsGUISyncForMirror
sends all sync target prefs
values when connecting to a client.NetworkConnection.Send: message of type Mirror.SpawnMessage with a size of [*] bytes is larger than the max allowed message size in one batch: 297421.
enableDivideSpawnData
to true
will divide the data and send it in smaller packets.PrefsGUISyncForMirror.enabled == true
on the client side, but the reception of the prefs
values has not yet been completed.PrefsGUISyncForMirror.IsSpawnFinished
or the onSpawnFinished
event.