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!
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.
- Default: on.
PrefsGUISyncForMirror
only sendsprefs
that have changed from their default values.- This assumes that the
prefs
for the same key on the server and client share the same default values. - If this flag is set to
false
, allprefs
values will be sent.
- Default: off.
PrefsGUISyncForMirror
sends all sync targetprefs
values when connecting to a client.- If the data is too large, it may cause an error due to Mirror's capacity limit (approximately 300 kbytes).
NetworkConnection.Send: message of type Mirror.SpawnMessage with a size of [*] bytes is larger than the max allowed message size in one batch: 297421.
- Setting
enableDivideSpawnData
totrue
will divide the data and send it in smaller packets. - When using this feature, there may be cases where
PrefsGUISyncForMirror.enabled == true
on the client side, but the reception of theprefs
values has not yet been completed. - Please monitor the completion of the reception using either
PrefsGUISyncForMirror.IsSpawnFinished
or theonSpawnFinished
event.
- Mirror's capacity limitation is derived from KCP Transport.
- If you encounter capacity limit errors, consider using a transport protocol other than KCP.
- For instance, Telepathy can handle larger amounts of data by configuring an appropriate buffer size.
- UV Checker Map Maker(CustomUVChecker_byValle_1K.png)
- PrefsGUI - Accessors and GUIs for persistent preference values using a JSON file