Home

Awesome

PrefsGUISync For Mirror

Synchronization subset for PrefsGUI over Mirror.

Installation

Install Mirror

Install package via scoped registry

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

Usage

<img src="Documentation~/2022-07-14-13-01-26.png" width="500px" />

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!

Skip synchronization of specified prefs

Disable sync toggle at the EditorWindow(See the section below).
or set prefs's key to PrefsGUISyncForMirror.ignoreKeyList.

EditorWindow

Window > PrefsGUI

<img src="Documentation~/2022-07-14-13-14-41.png" width="800px">

You can set whether to synchronize with the sync toggle.

Reduces the amount of data sent

Sync only value changed prefs

<img width="404" alt="image" src="https://github.com/user-attachments/assets/7c847d14-2659-466e-88cb-bfcd1c6a6d1e">

Divide spawn data

<img width="404" alt="image" src="https://github.com/user-attachments/assets/8c966b1e-e5f2-4de0-b6f7-e7f30c24892b">
NetworkConnection.Send: message of type Mirror.SpawnMessage with a size of [*] bytes is larger than the max allowed message size in one batch: 297421.

Consider using transport other than KCP such as Telepathy

Reference