{"id":15011586,"url":"https://github.com/bdovaz/UnityNuGet","last_synced_at":"2025-03-13T03:16:34.159Z","repository":{"id":37450858,"uuid":"343192272","full_name":"bdovaz/UnityNuGet","owner":"bdovaz","description":"Provides a service to install NuGet packages into a Unity project via the Unity Package Manager","archived":false,"fork":true,"pushed_at":"2024-10-29T08:34:25.000Z","size":772,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-29T09:52:39.858Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"xoofx/UnityNuGet","license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bdovaz.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":".github/FUNDING.yml","license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":["xoofx"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-02-28T19:15:43.000Z","updated_at":"2024-10-29T08:34:29.000Z","dependencies_parsed_at":"2023-02-10T14:01:14.697Z","dependency_job_id":"4a33e1b2-8db8-4163-b0f5-984cacb1886a","html_url":"https://github.com/bdovaz/UnityNuGet","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdovaz%2FUnityNuGet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdovaz%2FUnityNuGet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdovaz%2FUnityNuGet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdovaz%2FUnityNuGet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bdovaz","download_url":"https://codeload.github.com/bdovaz/UnityNuGet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243330319,"owners_count":20274039,"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":["asp-net-core","dotnet","dotnet-core","nuget","unity","unity3d"],"created_at":"2024-09-24T19:41:18.331Z","updated_at":"2025-03-13T03:16:34.134Z","avatar_url":"https://github.com/bdovaz.png","language":"C#","funding_links":["https://github.com/sponsors/xoofx"],"categories":[],"sub_categories":[],"readme":"# UnityNuGet [![Build Status](https://img.shields.io/github/actions/workflow/status/bdovaz/UnityNuGet/ci.yml?branch=master)](https://github.com/xoofx/UnityNuGet/actions) [![Static Badge](https://img.shields.io/badge/server-status-blue)](https://unitynuget-registry.openupm.com/status) [![Static Badge](https://img.shields.io/badge/server-feed-blue)](https://unitynuget-registry.openupm.com/-/all)\n\n\u003cimg align=\"right\" width=\"160px\" height=\"160px\" alt=\"UnityNuGet logo\" src=\"img/unitynuget.png\"\u003e\n\nThis project provides a seamlessly integration of a [curated list](registry.json) of NuGet packages within the Unity Package Manager.\n\n\u003e [!IMPORTANT]\n\u003e DISCLAIMER: This is not an official service provided by Unity Technologies Inc.\n\n## Usage\n\n\u003e [!NOTE]\n\u003e Feed provided by [OpenUPM](https://medium.com/openupm/openupm-launches-alternative-unitynuget-registry-0b8cc663cc41).\n\n### Add scope registry (manifest.json)\n\nIn order to use this service you simply need to edit the `Packages/manifest.json` in your project and add the following [scoped registry](https://docs.unity3d.com/Manual/upm-scoped.html):\n\n```json\n{\n  \"scopedRegistries\": [\n    {\n      \"name\": \"Unity NuGet\",\n      \"url\": \"https://unitynuget-registry.openupm.com\",\n      \"scopes\": [\n        \"org.nuget\"\n      ]\n    }\n  ],\n  \"dependencies\": {\n    \"org.nuget.scriban\": \"2.1.0\"\n  }\n}\n```\n\n### Add scope registry (Package Manager UI)\n\nInstructions: \u003chttps://docs.unity3d.com/Manual/class-PackageManager.html\u003e\n\n```yaml\nName: Unity NuGet\n\nUrl: https://unitynuget-registry.openupm.com\n\nScope(s): org.nuget\n```\n\n### Disable Assembly Version Validation\n\n\u003e [!IMPORTANT]\nIn Unity 2022.2+, this is the [default behavior](https://discussions.unity.com/t/editor-assembly-loading-issues-unloading-broken-assembly-could-not-load-signature/760376/46), so no action is required.\n\nThis step is necessary to ensure that binding redirects for [strongly named assemblies](https://learn.microsoft.com/en-us/dotnet/standard/assembly/strong-named) in NuGet packages resolve correctly to paths _within the Unity project_.\n\nFor earlier Unity versions, uncheck `Project Settings \u003e Player \u003e Other Settings \u003e Configuration \u003e Assembly Version Validation`.\n\n### Verify scoped registry installation\n\n\u003e [!WARNING]\n\u003e WARNING: If you are encountering weird compilation errors with UnityNuGet and you have been using UnityNuGet already,\n\u003e it could be that we have updated packages on the server, and in that case, you need to clear the cache containing\n\u003e all Unity NPM packages downloaded from the registry.\n\u003e On Windows, this cache by default is located at: `%LOCALAPPDATA%\\Unity\\cache\\npm`\n\u003e\n\u003e Cache locations by OS: \u003chttps://docs.unity3d.com/Manual/upm-cache.html\u003e\n\nWhen opening the Package Manager Window, you should see a few packages coming from NuGet (with the postfix text `‎ (NuGet)`)\n\n![UnityEditorWithNuGet](img/unity_editor_with_nuget.jpg)\n\n## Adding a package to the registry\n\nThis service provides only a [curated list](registry.json) of NuGet packages.\n\nYour NuGet package needs to respect a few constraints in order to be listed in the curated list:\n\n- It must have non-preview versions (e.g `1.0.0` but not `1.0.0-preview.1`).\n- It must provide at least `.NETStandard2.0` (and optionally `.NETStandard2.1`) assemblies as part of its package.\n\nYou can send a PR to this repository to modify the [registry.json](registry.json) file (don't forget to maintain the alphabetical order and format).\n\nYou also need to **specify the lowest version of your package that has support for `.NETStandard2.0`** upward so that other packages depending on your package have a chance to work with.\n\nBeware that **all transitive dependencies of the package** must be **explicitly listed** in the registry as well.\n\n\u003e [!NOTE]\n\u003e\n\u003e - We reserve the right to decline a package to be available through this service.\n\u003e - The server will be updated only when a new version tag is pushed on the main branch.\n\n## Compatibility\n\nOnly compatible with **`Unity 2019.1`** and potentially with newer version.\n\n\u003e [!NOTE]\n\u003e This service is currently tested with **`Unity 2019.x, 2020.x, 2021.x, 2022.x, 2023.x and 6000.0.x`**.\n\u003e\n\u003e It may not work with a more recent version of Unity.\n\n## Self-Hosted installation\n\nTo have more control of the server, it is recommended to host the service on your own. This way you can decide which specific packages to include in the [registry.json](registry.json) file which makes the server lighter.\n\nThis project publishes a [Docker image in ghcr.io](https://github.com/bdovaz/UnityNuGet/pkgs/container/unitynuget) that can be consumed to create a container and host it as you wish:\n\n- [Local](examples/docker)\n- [Azure Container Apps](https://azure.microsoft.com/en-us/products/container-apps)\n- [AWS Fargate](https://aws.amazon.com/fargate/)\n- [Google Cloud Run](https://cloud.google.com/run)\n\nThere is a complete example with all available options in [examples/docker](examples/docker).\n\n### Accessing a private NuGet feed from Azure DevOps\n\n\u003e [!NOTE]\n\u003e The [Azure DevOps PAT](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate) must have `Packaging (Read)` permissions.\n\nAs documented in the example, it is possible to provide a custom NuGet.Config file.\n\nTo add a private feed, the following fields must be filled in:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cconfiguration\u003e\n  \u003cpackageSources\u003e\n    \u003cclear /\u003e\n    \u003cadd key=\"nuget.org\" value=\"https://api.nuget.org/v3/index.json\" protocolVersion=\"3\" /\u003e\n    \u003cadd key=\"MyCustomFeed\" value=\"https://pkgs.dev.azure.com/\u003cORG_NAME\u003e/\u003cPROJECT_NAME\u003e/_packaging/\u003cFEED_NAME\u003e/nuget/v3/index.json\" /\u003e\n  \u003c/packageSources\u003e\n  \u003cpackageSourceCredentials\u003e\n    \u003cMyCustomFeed\u003e\n      \u003cadd key=\"Username\" value=\"\u003cAzure DevOps Email\u003e\" /\u003e\n      \u003cadd key=\"ClearTextPassword\" value=\"\u003cAzure DevOps PAT\u003e\" /\u003e\n    \u003c/MyCustomFeed\u003e\n  \u003c/packageSourceCredentials\u003e\n\u003c/configuration\u003e\n```\n\n## FAQ\n\n### **Where is hosted this service?**\n\nIt is hosted by [OpenUPM](https://medium.com/openupm/openupm-launches-alternative-unitynuget-registry-0b8cc663cc41).\n\n### **Why can't you add all NuGet packages?**\n\nThe reason is that many NuGet packages are not compatible with Unity, or do not provide `.NETStandard2.0` or `.NETStandard2.1` assemblies or are not relevant for being used within Unity.\n\n### **Why does it require .NETStandard2.0?**\n\nSince 2019.1.x, Unity is compatible with `.NETStandard2.0` and it is the .NET profile that is preferred to be used.\n\nHaving a `.NETStandard2.0` for NuGet packages for Unity can ensure that the experience to add a package to your project is consistent and well supported.\n\nAs of Unity 2021.x it also supports `.NETStandard2.1` so packages providing this target will be compatible with this version of Unity or newer.\n\n\u003e More information: \u003chttps://docs.unity3d.com/Manual/dotnet-profile-support.html\u003e\n\n### **How this service is working?**\n\nThis project implements a simplified compatible NPM server in C# using ASP.NET Core and converts NuGet packages to Unity packages before serving them.\n\nAt a threshold defined by `UpdateInterval` (10 minutes by default), packages are updated from NuGet so that if a new version is published, from the curated list of NuGet packages, it will be available through this service.\n\nOnce converted, these packages are cached on the disk on the server.\n\n## License\n\nThis software is released under the [BSD-Clause 2 license](https://opensource.org/licenses/BSD-2-Clause).\n\n## Author\n\nAlexandre Mutel aka [xoofx](https://xoofx.github.io)\n\n## Maintainer/s\n\nBorja Domínguez aka [bdovaz](https://github.com/bdovaz)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdovaz%2FUnityNuGet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbdovaz%2FUnityNuGet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdovaz%2FUnityNuGet/lists"}