{"id":18788703,"url":"https://github.com/pereviader/manualreserialization","last_synced_at":"2026-01-19T22:08:16.778Z","repository":{"id":167734492,"uuid":"479328674","full_name":"PereViader/ManualReserialization","owner":"PereViader","description":"Reserialization tools for the Unity3d engine. Refactor the scripts in your project quicker.","archived":false,"fork":false,"pushed_at":"2025-03-28T22:47:55.000Z","size":90,"stargazers_count":4,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-06T23:11:27.748Z","etag":null,"topics":["developer-tool","developer-tools","tool","tools","unity3d","unity3d-plugin"],"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/PereViader.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-04-08T09:32:41.000Z","updated_at":"2025-03-28T22:47:49.000Z","dependencies_parsed_at":"2025-04-13T13:56:54.133Z","dependency_job_id":"fe3a498e-0f29-4286-ae07-1cc19573742d","html_url":"https://github.com/PereViader/ManualReserialization","commit_stats":null,"previous_names":["pereviader/manualreserialization"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PereViader%2FManualReserialization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PereViader%2FManualReserialization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PereViader%2FManualReserialization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PereViader%2FManualReserialization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PereViader","download_url":"https://codeload.github.com/PereViader/ManualReserialization/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PereViader%2FManualReserialization/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259053511,"owners_count":22798438,"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":["developer-tool","developer-tools","tool","tools","unity3d","unity3d-plugin"],"created_at":"2024-11-07T21:05:36.523Z","updated_at":"2026-01-19T22:08:11.733Z","avatar_url":"https://github.com/PereViader.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Publish Release](https://github.com/PereViader/ManualReserialization/actions/workflows/PublishRelease.yml/badge.svg)](https://github.com/PereViader/ManualReserialization/actions/workflows/PublishRelease.yml) ![Unity version 2021.3](https://img.shields.io/badge/Unity-2021.3-57b9d3.svg?style=flat\u0026logo=unity) [![openupm](https://img.shields.io/npm/v/com.pereviader.manualreserialization?label=openupm\u0026registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.pereviader.manualreserialization/) [![openupm](https://img.shields.io/badge/dynamic/json?color=brightgreen\u0026label=downloads\u0026query=%24.downloads\u0026suffix=%2Fmonth\u0026url=https%3A%2F%2Fpackage.openupm.com%2Fdownloads%2Fpoint%2Flast-month%2Fcom.pereviader.manualreserialization)](https://openupm.com/packages/com.pereviader.manualreserialization/)\n\n# ManualReserialization\n\nThis library allows you to programatically update the all assets in your project when the structure of your serialized fields change.\n\nRegardless of where those assets are found within your asset database* the reserialization will be applied to them allowing you to programatically update the shape of your objects.\n\n*`SerializeReference` is not compatible but could be implemented\n\n```csharp\npublic class SomeClass : MonoBehaviour\n{\n    [Obsolete] public int someField;\n    public bool newField;\n\n    [MenuItem(\"Tools/Reserialize the class\")] //You can add a menu item to be able to run this snippet of code from the UnityEditor\n    public static void Reserialize()\n    {\n        Reserializer.Reserialize\u003cSomeClass\u003e((x, metadata) =\u003e x.newField = x.someField == 1);\n    }\n}\n```\n\nThe metadata provided can be inspected to see if the instance of the type comes from either a prefab, scriptable object or a scene\n\nWhen implementing the delegate, make sure that it is [idempotent](https://en.wikipedia.org/wiki/Idempotence). This is necessary because if the reserialization is applied to a root prefab and also to prefab variants, it should only produce overrides when actually necessary.\n\nThis is an example of non idempotent implementation\n\n```csharp\n//Before running\n//RootPrefab: someField == 1\n//PrefabVariant: without override thus value == 1\n\nReserializer.Reserialize\u003cSomeClass\u003e((x, metadata) =\u003e x.someField++);\n\n//After running\n//RootPrefab: someField == 2\n//PrefabVariant override with someField == 3\n```\n\nThe variant ends up with an override of value 3 because the delegate will run after the original prefab has had the delegate run on it. Thus the root prefab is updated from 1 to 2 and then the variant is updated from 2 to 3.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpereviader%2Fmanualreserialization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpereviader%2Fmanualreserialization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpereviader%2Fmanualreserialization/lists"}