{"id":17151194,"url":"https://github.com/fuqunaga/prefsguisyncformirror","last_synced_at":"2025-04-13T12:02:36.838Z","repository":{"id":45517069,"uuid":"492715770","full_name":"fuqunaga/PrefsGUISyncForMirror","owner":"fuqunaga","description":"Sync subset for PrefsGUI over Mirror","archived":false,"fork":false,"pushed_at":"2024-09-26T07:08:03.000Z","size":18534,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-16T19:48:38.853Z","etag":null,"topics":["mirror","network","unity"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fuqunaga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"fuqunaga"}},"created_at":"2022-05-16T06:50:00.000Z","updated_at":"2024-10-11T10:59:15.000Z","dependencies_parsed_at":"2022-07-18T08:30:51.995Z","dependency_job_id":null,"html_url":"https://github.com/fuqunaga/PrefsGUISyncForMirror","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuqunaga%2FPrefsGUISyncForMirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuqunaga%2FPrefsGUISyncForMirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuqunaga%2FPrefsGUISyncForMirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuqunaga%2FPrefsGUISyncForMirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fuqunaga","download_url":"https://codeload.github.com/fuqunaga/PrefsGUISyncForMirror/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240304560,"owners_count":19780312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mirror","network","unity"],"created_at":"2024-10-14T21:37:29.104Z","updated_at":"2025-04-13T12:02:36.821Z","avatar_url":"https://github.com/fuqunaga.png","language":"C#","funding_links":["https://github.com/sponsors/fuqunaga"],"categories":[],"sub_categories":[],"readme":"# PrefsGUISync For Mirror\n\n[![npm version](https://badge.fury.io/js/ga.fuquna.prefsguisyncformirror.svg)](https://badge.fury.io/js/ga.fuquna.prefsguisyncformirror)\n[![openupm](https://img.shields.io/npm/v/ga.fuquna.prefsguisyncformirror?label=openupm\u0026registry_uri=https://package.openupm.com)](https://openupm.com/packages/ga.fuquna.prefsguisyncformirror/)\n\nSynchronization subset for [PrefsGUI](https://github.com/fuqunaga/PrefsGUI) over [Mirror](https://github.com/vis2k/Mirror).\n\n![](Documentation~/prefsguisync.webp)\n\n\n# Installation\n## Install Mirror\n - [Mirror via AssetStore](https://assetstore.unity.com/packages/tools/network/mirror-129321)\n\n\n## Install package via scoped registry\n**Edit \u003e ProjectSettings... \u003e Package Manager \u003e Scoped Registries**\n\nEnter the following and click the Save button.\n\n```\n\"name\": \"fuqunaga\",\n\"url\": \"https://registry.npmjs.com\",\n\"scopes\": [ \"ga.fuquna\" ]\n```\n![](Documentation~/2022-04-12-17-29-38.png)\n\n\n**Window \u003e Package Manager**\n\nSelect `MyRegistries` in `Packages:`\n\n![](Documentation~/2022-04-12-17-40-26.png)\n\nSelect `PrefsGUISync For Mirror` and click the Install button\n\n\n# Usage\n\u003cimg src=\"Documentation~/2022-07-14-13-01-26.png\" width=\"500px\" /\u003e  \n\nPut `Packages/PrefsGUISync For Mirror/Runtime/PrefsGUISync.prefab` to the scene.  \nPrefsGUISyncForMirror component inherits from [NetworkBehaivour](https://mirror-networking.gitbook.io/docs/components/networkbehaviour), so take steps to make it work(call `Spawn()` or put it on the online scene).  \n  \nNow all `prefs` are automatically synchronized between the server and client!\n\n## Skip synchronization of specified `prefs`\nDisable sync toggle at the **EditorWindow**(See the section below).  \nor set `prefs`'s key to `PrefsGUISyncForMirror.ignoreKeyList`.\n\n### EditorWindow\n\n**Window \u003e PrefsGUI**\n\n\u003cimg src=\"Documentation~/2022-07-14-13-14-41.png\" width=\"800px\"\u003e\n\nYou can set whether to synchronize with the sync toggle.\n\n\n## Reduces the amount of data sent\n\n### Sync only value changed `prefs`\n\n\u003cimg width=\"404\" alt=\"image\" src=\"https://github.com/user-attachments/assets/7c847d14-2659-466e-88cb-bfcd1c6a6d1e\"\u003e\n\n* Default: *on*.\n* `PrefsGUISyncForMirror` only sends `prefs` that have changed from their default values.\n* This assumes that the `prefs` for the same key on the server and client share the same default values.\n* If this flag is set to `false`, all `prefs` values will be sent.\n\n### Divide spawn data\n\n\u003cimg width=\"404\" alt=\"image\" src=\"https://github.com/user-attachments/assets/8c966b1e-e5f2-4de0-b6f7-e7f30c24892b\"\u003e\n\n* Default: *off*.\n* `PrefsGUISyncForMirror` sends all sync target `prefs` values when connecting to a client.\n* If the data is too large, it may cause an error due to Mirror's capacity limit (approximately 300 kbytes).  \n```\nNetworkConnection.Send: message of type Mirror.SpawnMessage with a size of [*] bytes is larger than the max allowed message size in one batch: 297421.\n```\n* Setting `enableDivideSpawnData` to `true` will divide the data and send it in smaller packets.\n* When using this feature, there may be cases where `PrefsGUISyncForMirror.enabled == true` on the client side, but the reception of the `prefs` values has not yet been completed.\n* Please monitor the completion of the reception using either `PrefsGUISyncForMirror.IsSpawnFinished` or the `onSpawnFinished` event.\n\n\n\n### Consider using transport other than [KCP] such as [Telepathy]\n\n* Mirror's capacity limitation is derived from [KCP Transport][KCP].\n* If you encounter capacity limit errors, consider using a transport protocol other than KCP.\n* For instance, [Telepathy] can handle larger amounts of data by configuring an appropriate buffer size.\n\n[KCP]: https://mirror-networking.gitbook.io/docs/manual/transports/kcp-transport\n[Telepathy]: https://mirror-networking.gitbook.io/docs/manual/transports/telepathy-transport\n\n# Reference\n- [UV Checker Map Maker](http://uvchecker.byvalle.com/)(CustomUVChecker_byValle_1K.png)\n- [PrefsGUI](https://github.com/fuqunaga/PrefsGUI) - Accessors and GUIs for persistent preference values using a JSON file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuqunaga%2Fprefsguisyncformirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuqunaga%2Fprefsguisyncformirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuqunaga%2Fprefsguisyncformirror/lists"}