{"id":16210047,"url":"https://github.com/ashblue/fluid-unique-id","last_synced_at":"2025-05-12T14:43:09.099Z","repository":{"id":37886434,"uuid":"246938355","full_name":"ashblue/fluid-unique-id","owner":"ashblue","description":"A micro-framework to manage unique IDs in scenes with Unity","archived":false,"fork":false,"pushed_at":"2024-11-06T23:37:54.000Z","size":911,"stargazers_count":37,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-04-15T16:35:27.774Z","etag":null,"topics":["micro-framework","prefabs","repair-window","scene","unique-id","unity","unity3d"],"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/ashblue.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2020-03-12T22:01:12.000Z","updated_at":"2025-01-28T00:10:39.000Z","dependencies_parsed_at":"2025-01-16T23:14:52.034Z","dependency_job_id":null,"html_url":"https://github.com/ashblue/fluid-unique-id","commit_stats":{"total_commits":31,"total_committers":3,"mean_commits":"10.333333333333334","dds":"0.29032258064516125","last_synced_commit":"e91275393b93c1714ea9b0fa4dc0f7c4e43ba058"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashblue%2Ffluid-unique-id","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashblue%2Ffluid-unique-id/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashblue%2Ffluid-unique-id/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashblue%2Ffluid-unique-id/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashblue","download_url":"https://codeload.github.com/ashblue/fluid-unique-id/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253756783,"owners_count":21959307,"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":["micro-framework","prefabs","repair-window","scene","unique-id","unity","unity3d"],"created_at":"2024-10-10T10:34:59.670Z","updated_at":"2025-05-12T14:43:09.049Z","avatar_url":"https://github.com/ashblue.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Fluid Unique ID](images/banner.png)\n\n# Fluid Unique ID\n\nUnique ID management for Unity3D projects. A customizable micro-framework for managing consistent unique IDs across multiple scenes on your GameObjects. Built with large projects in mind and tools to prevent ID conflicts. \n\n* Works with prefabs\n* Visual repair tool included\n* No coding required\n* Easily extendable\n* Heavily tested with TDD and unit tests\n\n**Support**\n\nJoin the [Discord Community](https://discord.gg/8QHFfzn) if you have questions or need help.\n\n## Quickstart\n\nTo get started [install](#installation) the package and update it to the latest version. After that simply open a scene and attach the UniqueId component to your desired GameObject. These components are automatically prefab friendly with no extra overhead.\n\n![UniqueId Component](images/unique-id-component.png)\n\nBut what if you duplicate this object with the unique ID? It would no longer be unique and things might go haywire when users play. We'll talk about how to fix that in your game next.\n\n### Repair Window\n\nFluid Unique ID includes a repair window that will scan all of your scene's GameObjects for errors like duplication or `null` values. You can find the repair window in your menu bar at `Window -\u003e Fluid -\u003e Unique ID Repair`.\n\n![Repair Window](images/repair%20window.png)\n\nPlease note when clicking search that the repair window uses your current **Project Window** selection. Also it is recommended to not edit scenes until you've addressed all repair window errors. As search takes a snapshot of all scenes and can't detect if you're changing the scene without another search.\n\n### Examples\n\nClone this project down and see the examples folder to take things for a spin with live code samples.\n\n## Guides\n\n### How To Check For Unique IDs Before Building\n\nThe best way to make sure your project doesn't have Unique ID errors before building is to write a simple test. We'll use Unity's internal testing framework with a Unique ID report search. Please note this must be placed in an `Editor` folder to work.\n\n```c#\npublic class ExampleVerifyIdTest {\n    [Test]\n    public void It_should_not_have_invalid_IDs_in_the_project () {\n        var reporter = new UniqueIdReporter(\"Assets/Examples\");\n        var report = reporter.GetReport();\n\n        Assert.AreEqual(0, report.ErrorCount);\n    }\n}\n```\n\nNote that you can have build systems like Unity Cloud Build or custom build pipelines run tests automatically. This way you never accidentally check in a broken ID.\n\n### How To Populate Runtime Instances\n\nIf you need an ID for runtime instance from a prefab you can call the `UniqueId.PopulateIdIfEmpty()` method since prefabs automatically wipe their ID. This method is recommended to prevent accidentally rewriting a Unique ID.\n\n```c#\nvar id = GameObject.Instantiate(myPrefab).GetComponent(UniqueId);\nid.PopulateIdIfEmpty();\n```\n\nIf you are spawning instances off of a pre-existing instance with an ID. You can scramble it with the following pattern. Note this is potentially destructive so be careful.\n\n```c#\nvar id = GameObject.Instantiate(myPrefab).GetComponent(UniqueId);\nid.ScrambleId();\n```\n\n## Installation\n\nFluid Unique ID is used through [Unity's Package Manager](https://docs.unity3d.com/Manual/CustomPackages.html). In order to use it you'll need to add the following lines to your `Packages/manifest.json` file. After that you'll be able to visually control what specific version of Fluid Unique ID you're using from the package manager window in Unity. This has to be done so your Unity editor can connect to NPM's package registry.\n\n```json\n{\n  \"scopedRegistries\": [\n    {\n      \"name\": \"NPM\",\n      \"url\": \"https://registry.npmjs.org\",\n      \"scopes\": [\n        \"com.fluid\"\n      ]\n    }\n  ],\n  \"dependencies\": {\n    \"com.fluid.unique-id\": \"1.0.1\"\n  }\n}\n```\n\n## Releases\n\nArchives of specific versions and release notes are available on the [releases page](https://github.com/ashblue/fluid-unique-id/releases).\n\n## Nightly Builds\n\nTo access nightly builds of the `develop` branch that are package manager friendly, you'll need to manually edit your `Packages/manifest.json` as so. \n\n```json\n{\n    \"dependencies\": {\n      \"com.fluid.unique-id\": \"https://github.com/ashblue/fluid-unique-id.git#nightly\"\n    }\n}\n```\n\nNote that to get a newer nightly build you must delete this line and any related lock data in the manifest, let Unity rebuild, then add it back. As Unity locks the commit hash for Git urls as packages.\n\n## Development Environment\n\nIf you wish to run to run the development environment you'll need to install the latest [node.js](https://nodejs.org/en/). Then run the following from the root once.\n\n`npm install`\n\nIf you wish to create a build run `npm run build` from the root and it will populate the `dist` folder.\n\n### Making Commits\n\nAll commits should be made using [Commitizen](https://github.com/commitizen/cz-cli) (which is automatically installed when running `npm install`). Commits are automatically compiled to version numbers on release so this is very important. PRs that don't have Commitizen based commits will be rejected.\n\nTo make a commit type the following into a terminal from the root\n\n```bash\nnpm run commit\n```\n\n---\n\nThis project was generated with [Oyster Package Generator](https://github.com/ashblue/oyster-package-generator).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashblue%2Ffluid-unique-id","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashblue%2Ffluid-unique-id","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashblue%2Ffluid-unique-id/lists"}