[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7FF9SPKA8BC4EGCHJGGJK5P":3,"skill-same:01M7FF9SPKA8BC4EGCHJGGJK5P":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":14,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M7FF9SPKA8BC4EGCHJGGJK5P","unity-package-management",null,"Adds, removes, upgrades, and discovers Unity (UPM) packages from outside the Editor. Use for headless or CI package installs, verifying package IDs and versions, or choosing which packages a game needs. The Unity CLI doesn't manage packages.","heynemann\u002Fdotfiles-stow","heynemann","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F60965?v=4","01M7DFBD9ZDB2J2QE7R4AR0PES","Bernardo Heynemann","01M7FERV0J6GMQ0RHEH6EHGYRW",0,"MIT","https:\u002F\u002Fgithub.com\u002Fheynemann\u002Fdotfiles-stow\u002Fblob\u002Fmain\u002Fomp\u002F.omp\u002Fprofiles\u002Funity\u002Fskills-sh\u002F.agents\u002Fskills\u002Funity-package-management\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: unity-package-management\ndescription: Adds, removes, upgrades, and discovers Unity (UPM) packages from outside the Editor. Use for headless or CI package installs, verifying package IDs and versions, or choosing which packages a game needs. The Unity CLI doesn't manage packages.\nallowed-tools:\n  - Bash\n  - Read\n  - Write\n  - Edit\n---\n\n# Unity Package Management (headless, via the C# Client API)\n\nAdd, remove, upgrade, and discover UPM (Unity Package Manager) packages programmatically with\n`UnityEditor.PackageManager.Client`, driven headless from the terminal or CI. Do **not**\nhand-edit `Packages\u002Fmanifest.json` — the Client API resolves dependencies and compatible\nversions correctly, whereas manual edits routinely break resolution.\n\nThis complements the **`unity-cli`** skill (editor install, project creation, build\u002Ftest): the\nCLI has **no** package-management command, so all package work goes through the Editor's C# API.\n\n## When to use\n\n- Add \u002F remove \u002F upgrade one or more packages in an existing or freshly-created project.\n- Set up a project's packages non-interactively in CI.\n- Verify a package id exists, or find its available versions, before depending on it.\n- Decide which packages a game actually needs — see\n  [references\u002Fselect-packages.md](references\u002Fselect-packages.md).\n\n## Choosing what to install\n\nInstall what the project actually needs, not everything; prefer packages the chosen template\nalready provides (URP templates already include the render pipeline, Input System, etc.). The\ngenre \u002F look \u002F platform \u002F monetization → package mapping, plus how to search the registry, is\nin [references\u002Fselect-packages.md](references\u002Fselect-packages.md). Produce a **deduplicated\nlist of package ids** and read it back to the user before installing.\n\n## The `-quit` problem — why NOT `unity run` for installs\n\n`Client.Add` \u002F `Client.AddAndRemove` are **asynchronous**: they return a `Request` that only\ncompletes on later `EditorApplication.update` ticks (the UPM child process marshals its result\nback on the Editor's main-loop pump, so a blocking `while (!req.IsCompleted)` busy-wait\ndeadlocks it). The Editor must **stay alive** after `-executeMethod` returns, until the request\nfinishes.\n\n`unity run` **cannot** be used for the installer: its default path injects `-quit` (see the reserved\nflags in the **`unity-cli`** skill). With `-quit`, the Editor quits the instant the method\nreturns — before UPM resolves — so packages never install and the callback never runs.\n\n**Solution:** launch the **Editor binary directly** in `-batchmode` **without** `-quit`. The\nEditor stays alive, `EditorApplication.update` keeps ticking, the poll callback runs, and it\ncalls `EditorApplication.Exit(code)` itself when done — which both quits and sets the process\nexit code.\n\n## The installer script\n\nWrite this to `Assets\u002FEditor\u002FProjectBootstrap\u002FPackageInstaller.cs`. It must live under an\n`Editor\u002F` folder (or an Editor-only assembly) because it uses `UnityEditor`.\n\n```csharp\nusing System.Linq;\nusing UnityEditor;\nusing UnityEditor.PackageManager;\nusing UnityEditor.PackageManager.Requests;\nusing UnityEngine;\n\nnamespace ProjectBootstrap\n{\n    \u002F\u002F Installs (and optionally removes) a fixed set of packages via the PackageManager\n    \u002F\u002F Client API, headless-safe.\n    public static class PackageInstaller\n    {\n        \u002F\u002F EDIT this list to match the package selection (see references\u002Fselect-packages.md).\n        static readonly string[] PackagesToAdd =\n        {\n            \"com.unity.inputsystem\",\n            \"com.unity.cinemachine\",\n            \"com.unity.render-pipelines.universal\",\n            \u002F\u002F \"com.unity.package@1.2.3\"  \u002F\u002F pin a version with @ when a minimum is required\n        };\n\n        \u002F\u002F Optionally drop packages in the same resolution pass (e.g. a template default you don't want).\n        static readonly string[] PackagesToRemove = { };\n\n        const double TimeoutSeconds = 600; \u002F\u002F UPM resolution + downloads can be slow\n\n        static AddAndRemoveRequest _request;\n        static double _deadline;\n\n        \u002F\u002F Invoke with: -executeMethod ProjectBootstrap.PackageInstaller.Install  (NO -quit)\n        public static void Install()\n        {\n            if (PackagesToAdd.Length == 0 && PackagesToRemove.Length == 0)\n            {\n                Debug.Log(\"[PackageInstaller] Nothing to do.\");\n                EditorApplication.Exit(0);\n                return;\n            }\n\n            Debug.Log($\"[PackageInstaller] Adding: {string.Join(\", \", PackagesToAdd)}\");\n            _request = Client.AddAndRemove(packagesToAdd: PackagesToAdd, packagesToRemove: PackagesToRemove);\n            _deadline = EditorApplication.timeSinceStartup + TimeoutSeconds;\n            EditorApplication.update += Poll;\n        }\n\n        static void Poll()\n        {\n            if (_request == null) return;\n\n            if (!_request.IsCompleted)\n            {\n                if (EditorApplication.timeSinceStartup > _deadline)\n                {\n                    EditorApplication.update -= Poll;\n                    Debug.LogError(\"[PackageInstaller] Timed out waiting for UPM.\");\n                    EditorApplication.Exit(2);\n                }\n                return;\n            }\n\n            EditorApplication.update -= Poll;\n\n            if (_request.Status == StatusCode.Success)\n            {\n                var names = _request.Result.Select(p => $\"{p.name}@{p.version}\");\n                Debug.Log($\"[PackageInstaller] Resolved: {string.Join(\", \", names)}\");\n                EditorApplication.Exit(0);\n            }\n            else\n            {\n                Debug.LogError($\"[PackageInstaller] Failed: {_request.Error?.message}\");\n                EditorApplication.Exit(1);\n            }\n        }\n    }\n}\n```\n\n`AddAndRemove` installs the whole set in a single UPM resolution pass — faster and less\nerror-prone than one `Client.Add` per package.\n\n**Add \u002F remove \u002F upgrade with one script:**\n- **Add**: list the id in `PackagesToAdd`.\n- **Remove**: list the id in `PackagesToRemove`.\n- **Upgrade \u002F pin**: add the id with `@\u003Cversion>` (e.g. `com.unity.cinemachine@2.9.7`). Without\n  a version, resolution picks the latest compatible release.\n\n## Discovering \u002F verifying packages\n\nTo confirm an id exists or list its versions before adding it, search the registry. The\nin-Editor `Client.SearchAll()` \u002F `Client.Search(\"\u003Cid>\")` calls are also async, so they use the\n**same poll-and-`Exit` pattern and the same headless run** as the installer. Write\n`Assets\u002FEditor\u002FProjectBootstrap\u002FPackageSearch.cs`:\n\n```csharp\nusing System.Linq;\nusing UnityEditor;\nusing UnityEditor.PackageManager;\nusing UnityEditor.PackageManager.Requests;\nusing UnityEngine;\n\nnamespace ProjectBootstrap\n{\n    public static class PackageSearch\n    {\n        const double TimeoutSeconds = 120;\n        static SearchRequest _request;\n        static double _deadline;\n\n        \u002F\u002F Invoke with: -executeMethod ProjectBootstrap.PackageSearch.SearchAll  (NO -quit)\n        public static void SearchAll()\n        {\n            _request = Client.SearchAll();                 \u002F\u002F or Client.Search(\"com.unity.cinemachine\")\n            _deadline = EditorApplication.timeSinceStartup + TimeoutSeconds;\n            EditorApplication.update += Poll;\n        }\n\n        static void Poll()\n        {\n            if (_request == null) return;\n            if (!_request.IsCompleted)\n            {\n                if (EditorApplication.timeSinceStartup > _deadline)\n                {\n                    EditorApplication.update -= Poll;\n                    Debug.LogError(\"[PackageSearch] Timed out.\");\n                    EditorApplication.Exit(2);\n                }\n                return;\n            }\n            EditorApplication.update -= Poll;\n\n            if (_request.Status == StatusCode.Success)\n            {\n                foreach (var p in _request.Result.OrderBy(p => p.name))\n                    Debug.Log($\"[PackageSearch] {p.name}@{p.versions.latestCompatible}  {p.displayName}\");\n                Debug.Log($\"[PackageSearch] {_request.Result.Length} packages found.\");\n                EditorApplication.Exit(0);\n            }\n            else\n            {\n                Debug.LogError($\"[PackageSearch] Failed: {_request.Error?.message}\");\n                EditorApplication.Exit(1);\n            }\n        }\n    }\n}\n```\n\n`_request.Result` is a `PackageInfo[]`; each entry exposes `name`, `displayName`, `description`,\nand `versions` (`.latest`, `.latestCompatible`, `.all`). For a terminal-only check without the\nEditor (a **known** id, not free-text search), query the registry directly — see\n[references\u002Fselect-packages.md](references\u002Fselect-packages.md#discovering-and-verifying-packages).\n\n## Run it headless (direct Editor invocation, no `-quit`)\n\nResolve the Editor binary from the version, then run it in batch mode. The script owns quitting\nvia `EditorApplication.Exit`, so do **not** pass `-quit`:\n\n```bash\nVERSION=\"\u003Cversion>\"          # e.g. 6000.0.47f1 (or an installed version)\nPROJECT=\"\u003Cproject-path>\"\nMETHOD=\"ProjectBootstrap.PackageInstaller.Install\"   # or ...PackageSearch.SearchAll\n\n# Install directory of that editor (Hub layout), via the unity CLI\nED=$(unity editors path \"$VERSION\" --format json | python3 -c \"import sys,json;print(json.load(sys.stdin)['data']['path'])\")\n\n# Resolve the executable per-OS (handles both \"dir containing Unity.app\" and the \".app\" itself)\ncase \"$(uname)\" in\n  Darwin) if [ -d \"$ED\u002FUnity.app\" ]; then UNITY_BIN=\"$ED\u002FUnity.app\u002FContents\u002FMacOS\u002FUnity\";\n          elif [[ \"$ED\" == *.app ]]; then UNITY_BIN=\"$ED\u002FContents\u002FMacOS\u002FUnity\";\n          else UNITY_BIN=\"$ED\u002FUnity\"; fi ;;\n  Linux)  UNITY_BIN=\"$ED\u002FEditor\u002FUnity\" ;;\n  *)      UNITY_BIN=\"$ED\u002FEditor\u002FUnity.exe\" ;;   # Windows (Git Bash \u002F MSYS); use Editor\\Unity.exe in PowerShell\nesac\n\n\"$UNITY_BIN\" -batchmode -projectPath \"$PROJECT\" -executeMethod \"$METHOD\" -logFile -\necho \"Exit code: $?\"   # 0 = success, 1 = UPM error, 2 = timeout\n```\n\n`-logFile -` streams the Editor log (including the `[PackageInstaller]` \u002F `[PackageSearch]`\nlines) to stdout so you can watch resolution progress and read any UPM error. If\n`unity editors path` output shape differs on your build, get the directory from\n`unity editors --installed --format json` instead.\n\n## Verify\n\n```bash\n# Every requested id should appear as a dependency\ncat \"\u003Cproject-path>\u002FPackages\u002Fmanifest.json\"\n```\n\nConfirm the run exited `0` and each package from the list is present in `manifest.json`. If a\npackage fails to resolve, `_request.Error.message` is logged; read it and check the id\u002Fversion\nagainst the registry. The Editor's own log (including the `[PackageInstaller]` lines) is the\nstdout you streamed with `-logFile -` above — read it there, not via `unity logs` (which shows\nthe CLI's own log, not the Editor's).\n\n## Import & save headlessly (generate `.meta` files)\n\nAfter a script or tool writes new `.cs`\u002Fasset files, Unity must **import** them so it generates\nthe `.meta` file each asset needs — and every `.cs`\u002Fasset MUST be committed together with its\n`.meta`. Merely opening the project once (`unity open \"\u003Cproject-path>\"`) imports and generates\nthem; use this method when you need it **headless** (in a script or CI).\n\nUnlike the package installer, this is **synchronous** — it finishes before returning — so it's\nsafe to run via `unity run` (its injected `-quit` is harmless; the method also calls\n`EditorApplication.Exit` for a clean exit code). Write\n`Assets\u002FEditor\u002FProjectBootstrap\u002FProjectSaver.cs`:\n\n```csharp\nusing UnityEditor;\nusing UnityEngine;\n\nnamespace ProjectBootstrap\n{\n    public static class ProjectSaver\n    {\n        \u002F\u002F Invoke with: -executeMethod ProjectBootstrap.ProjectSaver.SaveAll\n        public static void SaveAll()\n        {\n            AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate);\n            AssetDatabase.SaveAssets();\n            Debug.Log(\"[ProjectSaver] Assets imported and saved.\");\n            EditorApplication.Exit(0);\n        }\n    }\n}\n```\n\n```bash\nunity run \"\u003Cproject-path>\" --editor-version \u003Cversion> \\\n  -- -executeMethod ProjectBootstrap.ProjectSaver.SaveAll\n```\n\n## Notes\n\n- These editor scripts are a bootstrap convenience. Leave them in\n  `Assets\u002FEditor\u002FProjectBootstrap\u002F` (they do nothing unless invoked) or delete them after\n  setup — your call; mention it to the user.\n- All scripts live under `Editor\u002F` because they use `UnityEditor`; they never ship in a build.\n- Monetization \u002F backend packages (`com.unity.purchasing`, `com.unity.services.levelplay`, the\n  UGS packages) install through this same mechanism, but do the actual **integration** via the\n  dedicated skills: **implement-in-app-purchases**, **levelplay-unity-integration**,\n  **build-live-game**.\n","# Unity Package Management (headless, via the C# Client API)\n\nAdd, remove, upgrade, and discover UPM (Unity Package Manager) packages programmatically with\n`UnityEditor.PackageManager.Client`, driven headless from the terminal or CI. Do **not**\nhand-edit `Packages\u002Fmanifest.json` — the Client API resolves dependencies and compatible\nversions correctly, whereas manual edits routinely break resolution.\n\nThis complements the **`unity-cli`** skill (editor install, project creation, build\u002Ftest): the\nCLI has **no** package-management command, so all package work goes through the Editor's C# API.\n\n## When to use\n\n- Add \u002F remove \u002F upgrade one or more packages in an existing or freshly-created project.\n- Set up a project's packages non-interactively in CI.\n- Verify a package id exists, or find its available versions, before depending on it.\n- Decide which packages a game actually needs — see\n  [references\u002Fselect-packages.md](references\u002Fselect-packages.md).\n\n## Choosing what to install\n\nInstall what the project actually needs, not everything; prefer packages the chosen template\nalready provides (URP templates already include the render pipeline, Input System, etc.). The\ngenre \u002F look \u002F platform \u002F monetization → package mapping, plus how to search the registry, is\nin [references\u002Fselect-packages.md](references\u002Fselect-packages.md). Produce a **deduplicated\nlist of package ids** and read it back to the user before installing.\n\n## The `-quit` problem — why NOT `unity run` for installs\n\n`Client.Add` \u002F `Client.AddAndRemove` are **asynchronous**: they return a `Request` that only\ncompletes on later `EditorApplication.update` ticks (the UPM child process marshals its result\nback on the Editor's main-loop pump, so a blocking `while (!req.IsCompleted)` busy-wait\ndeadlocks it). The Editor must **stay alive** after `-executeMethod` returns, until the request\nfinishes.\n\n`unity run` **cannot** be used for the installer: its default path injects `-quit` (see the reserved\nflags in the **`unity-cli`** skill). With `-quit`, the Editor quits the instant the method\nreturns — before UPM resolves — so packages never install and the callback never runs.\n\n**Solution:** launch the **Editor binary directly** in `-batchmode` **without** `-quit`. The\nEditor stays alive, `EditorApplication.update` keeps ticking, the poll callback runs, and it\ncalls `EditorApplication.Exit(code)` itself when done — which both quits and sets the process\nexit code.\n\n## The installer script\n\nWrite this to `Assets\u002FEditor\u002FProjectBootstrap\u002FPackageInstaller.cs`. It must live under an\n`Editor\u002F` folder (or an Editor-only assembly) because it uses `UnityEditor`.\n\n```csharp\nusing System.Linq;\nusing UnityEditor;\nusing UnityEditor.PackageManager;\nusing UnityEditor.PackageManager.Requests;\nusing UnityEngine;\n\nnamespace ProjectBootstrap\n{\n    \u002F\u002F Installs (and optionally removes) a fixed set of packages via the PackageManager\n    \u002F\u002F Client API, headless-safe.\n    public static class PackageInstaller\n    {\n        \u002F\u002F EDIT this list to match the package selection (see references\u002Fselect-packages.md).\n        static readonly string[] PackagesToAdd =\n        {\n            \"com.unity.inputsystem\",\n            \"com.unity.cinemachine\",\n            \"com.unity.render-pipelines.universal\",\n            \u002F\u002F \"com.unity.package@1.2.3\"  \u002F\u002F pin a version with @ when a minimum is required\n        };\n\n        \u002F\u002F Optionally drop packages in the same resolution pass (e.g. a template default you don't want).\n        static readonly string[] PackagesToRemove = { };\n\n        const double TimeoutSeconds = 600; \u002F\u002F UPM resolution + downloads can be slow\n\n        static AddAndRemoveRequest _request;\n        static double _deadline;\n\n        \u002F\u002F Invoke with: -executeMethod ProjectBootstrap.PackageInstaller.Install  (NO -quit)\n        public static void Install()\n        {\n            if (PackagesToAdd.Length == 0 && PackagesToRemove.Length == 0)\n            {\n                Debug.Log(\"[PackageInstaller] Nothing to do.\");\n                EditorApplication.Exit(0);\n                return;\n            }\n\n            Debug.Log($\"[PackageInstaller] Adding: {string.Join(\", \", PackagesToAdd)}\");\n            _request = Client.AddAndRemove(packagesToAdd: PackagesToAdd, packagesToRemove: PackagesToRemove);\n            _deadline = EditorApplication.timeSinceStartup + TimeoutSeconds;\n            EditorApplication.update += Poll;\n        }\n\n        static void Poll()\n        {\n            if (_request == null) return;\n\n            if (!_request.IsCompleted)\n            {\n                if (EditorApplication.timeSinceStartup > _deadline)\n                {\n                    EditorApplication.update -= Poll;\n                    Debug.LogError(\"[PackageInstaller] Timed out waiting for UPM.\");\n                    EditorApplication.Exit(2);\n                }\n                return;\n            }\n\n            EditorApplication.update -= Poll;\n\n            if (_request.Status == StatusCode.Success)\n            {\n                var names = _request.Result.Select(p => $\"{p.name}@{p.version}\");\n                Debug.Log($\"[PackageInstaller] Resolved: {string.Join(\", \", names)}\");\n                EditorApplication.Exit(0);\n            }\n            else\n            {\n                Debug.LogError($\"[PackageInstaller] Failed: {_request.Error?.message}\");\n                EditorApplication.Exit(1);\n            }\n        }\n    }\n}\n```\n\n`AddAndRemove` installs the whole set in a single UPM resolution pass — faster and less\nerror-prone than one `Client.Add` per package.\n\n**Add \u002F remove \u002F upgrade with one script:**\n- **Add**: list the id in `PackagesToAdd`.\n- **Remove**: list the id in `PackagesToRemove`.\n- **Upgrade \u002F pin**: add the id with `@\u003Cversion>` (e.g. `com.unity.cinemachine@2.9.7`). Without\n  a version, resolution picks the latest compatible release.\n\n## Discovering \u002F verifying packages\n\nTo confirm an id exists or list its versions before adding it, search the registry. The\nin-Editor `Client.SearchAll()` \u002F `Client.Search(\"\u003Cid>\")` calls are also async, so they use the\n**same poll-and-`Exit` pattern and the same headless run** as the installer. Write\n`Assets\u002FEditor\u002FProjectBootstrap\u002FPackageSearch.cs`:\n\n```csharp\nusing System.Linq;\nusing UnityEditor;\nusing UnityEditor.PackageManager;\nusing UnityEditor.PackageManager.Requests;\nusing UnityEngine;\n\nnamespace ProjectBootstrap\n{\n    public static class PackageSearch\n    {\n        const double TimeoutSeconds = 120;\n        static SearchRequest _request;\n        static double _deadline;\n\n        \u002F\u002F Invoke with: -executeMethod ProjectBootstrap.PackageSearch.SearchAll  (NO -quit)\n        public static void SearchAll()\n        {\n            _request = Client.SearchAll();                 \u002F\u002F or Client.Search(\"com.unity.cinemachine\")\n            _deadline = EditorApplication.timeSinceStartup + TimeoutSeconds;\n            EditorApplication.update += Poll;\n        }\n\n        static void Poll()\n        {\n            if (_request == null) return;\n            if (!_request.IsCompleted)\n            {\n                if (EditorApplication.timeSinceStartup > _deadline)\n                {\n                    EditorApplication.update -= Poll;\n                    Debug.LogError(\"[PackageSearch] Timed out.\");\n                    EditorApplication.Exit(2);\n                }\n                return;\n            }\n            EditorApplication.update -= Poll;\n\n            if (_request.Status == StatusCode.Success)\n            {\n                foreach (var p in _request.Result.OrderBy(p => p.name))\n                    Debug.Log($\"[PackageSearch] {p.name}@{p.versions.latestCompatible}  {p.displayName}\");\n                Debug.Log($\"[PackageSearch] {_request.Result.Length} packages found.\");\n                EditorApplication.Exit(0);\n            }\n            else\n            {\n                Debug.LogError($\"[PackageSearch] Failed: {_request.Error?.message}\");\n                EditorApplication.Exit(1);\n            }\n        }\n    }\n}\n```\n\n`_request.Result` is a `PackageInfo[]`; each entry exposes `name`, `displayName`, `description`,\nand `versions` (`.latest`, `.latestCompatible`, `.all`). For a terminal-only check without the\nEditor (a **known** id, not free-text search), query the registry directly — see\n[references\u002Fselect-packages.md](references\u002Fselect-packages.md#discovering-and-verifying-packages).\n\n## Run it headless (direct Editor invocation, no `-quit`)\n\nResolve the Editor binary from the version, then run it in batch mode. The script owns quitting\nvia `EditorApplication.Exit`, so do **not** pass `-quit`:\n\n```bash\nVERSION=\"\u003Cversion>\"          # e.g. 6000.0.47f1 (or an installed version)\nPROJECT=\"\u003Cproject-path>\"\nMETHOD=\"ProjectBootstrap.PackageInstaller.Install\"   # or ...PackageSearch.SearchAll\n\n# Install directory of that editor (Hub layout), via the unity CLI\nED=$(unity editors path \"$VERSION\" --format json | python3 -c \"import sys,json;print(json.load(sys.stdin)['data']['path'])\")\n\n# Resolve the executable per-OS (handles both \"dir containing Unity.app\" and the \".app\" itself)\ncase \"$(uname)\" in\n  Darwin) if [ -d \"$ED\u002FUnity.app\" ]; then UNITY_BIN=\"$ED\u002FUnity.app\u002FContents\u002FMacOS\u002FUnity\";\n          elif [[ \"$ED\" == *.app ]]; then UNITY_BIN=\"$ED\u002FContents\u002FMacOS\u002FUnity\";\n          else UNITY_BIN=\"$ED\u002FUnity\"; fi ;;\n  Linux)  UNITY_BIN=\"$ED\u002FEditor\u002FUnity\" ;;\n  *)      UNITY_BIN=\"$ED\u002FEditor\u002FUnity.exe\" ;;   # Windows (Git Bash \u002F MSYS); use Editor\\Unity.exe in PowerShell\nesac\n\n\"$UNITY_BIN\" -batchmode -projectPath \"$PROJECT\" -executeMethod \"$METHOD\" -logFile -\necho \"Exit code: $?\"   # 0 = success, 1 = UPM error, 2 = timeout\n```\n\n`-logFile -` streams the Editor log (including the `[PackageInstaller]` \u002F `[PackageSearch]`\nlines) to stdout so you can watch resolution progress and read any UPM error. If\n`unity editors path` output shape differs on your build, get the directory from\n`unity editors --installed --format json` instead.\n\n## Verify\n\n```bash\n# Every requested id should appear as a dependency\ncat \"\u003Cproject-path>\u002FPackages\u002Fmanifest.json\"\n```\n\nConfirm the run exited `0` and each package from the list is present in `manifest.json`. If a\npackage fails to resolve, `_request.Error.message` is logged; read it and check the id\u002Fversion\nagainst the registry. The Editor's own log (including the `[PackageInstaller]` lines) is the\nstdout you streamed with `-logFile -` above — read it there, not via `unity logs` (which shows\nthe CLI's own log, not the Editor's).\n\n## Import & save headlessly (generate `.meta` files)\n\nAfter a script or tool writes new `.cs`\u002Fasset files, Unity must **import** them so it generates\nthe `.meta` file each asset needs — and every `.cs`\u002Fasset MUST be committed together with its\n`.meta`. Merely opening the project once (`unity open \"\u003Cproject-path>\"`) imports and generates\nthem; use this method when you need it **headless** (in a script or CI).\n\nUnlike the package installer, this is **synchronous** — it finishes before returning — so it's\nsafe to run via `unity run` (its injected `-quit` is harmless; the method also calls\n`EditorApplication.Exit` for a clean exit code). Write\n`Assets\u002FEditor\u002FProjectBootstrap\u002FProjectSaver.cs`:\n\n```csharp\nusing UnityEditor;\nusing UnityEngine;\n\nnamespace ProjectBootstrap\n{\n    public static class ProjectSaver\n    {\n        \u002F\u002F Invoke with: -executeMethod ProjectBootstrap.ProjectSaver.SaveAll\n        public static void SaveAll()\n        {\n            AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate);\n            AssetDatabase.SaveAssets();\n            Debug.Log(\"[ProjectSaver] Assets imported and saved.\");\n            EditorApplication.Exit(0);\n        }\n    }\n}\n```\n\n```bash\nunity run \"\u003Cproject-path>\" --editor-version \u003Cversion> \\\n  -- -executeMethod ProjectBootstrap.ProjectSaver.SaveAll\n```\n\n## Notes\n\n- These editor scripts are a bootstrap convenience. Leave them in\n  `Assets\u002FEditor\u002FProjectBootstrap\u002F` (they do nothing unless invoked) or delete them after\n  setup — your call; mention it to the user.\n- All scripts live under `Editor\u002F` because they use `UnityEditor`; they never ship in a build.\n- Monetization \u002F backend packages (`com.unity.purchasing`, `com.unity.services.levelplay`, the\n  UGS packages) install through this same mechanism, but do the actual **integration** via the\n  dedicated skills: **implement-in-app-purchases**, **levelplay-unity-integration**,\n  **build-live-game**.\n",{"name":5,"description":7,"allowed-tools":24},[25,26,27,28],"Bash","Read","Write","Edit","main","e4d0a0940fd53fc8a3a1e1dcb967c0a18ea8ba0f","omp\u002F.omp\u002Fprofiles\u002Funity\u002Fskills-sh\u002F.agents\u002Fskills\u002Funity-package-management","https:\u002F\u002Fgithub.com\u002Fheynemann\u002Fdotfiles-stow","https:\u002F\u002Fgithub.com\u002Fheynemann","http:\u002F\u002Fwww.thumbor.org","CTO @ Flutter Brazil | Former Meta & Coinbase","2026-10-29 20:46:15",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add heynemann\u002Fdotfiles-stow --skill unity-package-management",{"tool":43,"command":44},"bunx","bunx skills add heynemann\u002Fdotfiles-stow --skill unity-package-management",{"tool":46,"command":47},"pnpm","pnpm dlx skills add heynemann\u002Fdotfiles-stow --skill unity-package-management","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fheynemann\u002Fdotfiles-stow\u002Fblob\u002Fmain\u002Fomp\u002F.omp\u002Fprofiles\u002Funity\u002Fskills-sh\u002F.agents\u002Fskills\u002Funity-package-management\u002FSKILL.md",true,[51],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Fselect-packages.md","REFERENCE","参考文档",6690,"https:\u002F\u002Fgithub.com\u002Fheynemann\u002Fdotfiles-stow\u002Fblob\u002Fmain\u002Fomp\u002F.omp\u002Fprofiles\u002Funity\u002Fskills-sh\u002F.agents\u002Fskills\u002Funity-package-management\u002Freferences\u002Fselect-packages.md",[58,65,72,79,86,93],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7FFA0PAN04C2DVK6A7CXK6K","unity-scriptableobjects","Architect Unity 6.3 LTS data and decoupling with ScriptableObjects: config\u002Fdata assets, shared runtime variables, event channels, and runtime sets\u002Fregistries. Use when designing data-driven systems, replacing singletons\u002Fmanagers, creating .asset data with CreateAssetMenu, or when the user mentions ScriptableObject, SO architecture, or data assets.","https:\u002F\u002Fgithub.com\u002Fheynemann\u002Fdotfiles-stow\u002Fblob\u002Fmain\u002Fomp\u002F.omp\u002Fprofiles\u002Funity\u002Fskills-sh\u002F.agents\u002Fskills\u002Funity-scriptableobjects\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7FF9KBCKR352R6ZSY2BB2J3","unity-input-system","Wire player input in Unity 6.3 LTS with the Input System package: Input Actions, action maps, the PlayerInput component, and reading values via callbacks or polling. Use when the project has a .inputactions asset or com.unity.inputsystem, or when the user mentions the Unity Input System, InputAction, action maps, PlayerInput, control schemes, or rebinding.","https:\u002F\u002Fgithub.com\u002Fheynemann\u002Fdotfiles-stow\u002Fblob\u002Fmain\u002Fomp\u002F.omp\u002Fprofiles\u002Funity\u002Fskills-sh\u002F.agents\u002Fskills\u002Funity-input-system\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7FF9FREKNGB4PQP8ZHTN1D8","unity-ecs-patterns","Master Unity ECS (Entity Component System) with DOTS, Jobs, and Burst for high-performance game development. Use when building data-oriented games, optimizing performance, or working with large entity counts.","https:\u002F\u002Fgithub.com\u002Fheynemann\u002Fdotfiles-stow\u002Fblob\u002Fmain\u002Fomp\u002F.omp\u002Fprofiles\u002Funity\u002Fskills-sh\u002F.agents\u002Fskills\u002Funity-ecs-patterns\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7FF99B1DV7RDAY98QVFFMA9","unity-csharp-scripting","Write Unity 6.3 LTS C# gameplay scripts: the MonoBehaviour lifecycle (Awake\u002FOnEnable\u002FStart\u002FUpdate\u002FFixedUpdate\u002FLateUpdate), GameObject and component access, coroutines, and Inspector serialization. Use when creating or editing .cs scripts in a Unity project, or when the user mentions MonoBehaviour, Start\u002FUpdate, GetComponent, SerializeField, coroutines, or \"Unity script\".","https:\u002F\u002Fgithub.com\u002Fheynemann\u002Fdotfiles-stow\u002Fblob\u002Fmain\u002Fomp\u002F.omp\u002Fprofiles\u002Funity\u002Fskills-sh\u002F.agents\u002Fskills\u002Funity-csharp-scripting\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7FF8ZK7PAPR4QZ44SY9ZDAJ","unity-cli","Controls the Unity Editor and projects from the command line, driving a running Editor to edit scenes and assets or run C#. Use when asked to install or manage Editors, licenses, or projects, set up version control, build, test, configure the Unity MCP server, or run any unity command.","https:\u002F\u002Fgithub.com\u002Fheynemann\u002Fdotfiles-stow\u002Fblob\u002Fmain\u002Fomp\u002F.omp\u002Fprofiles\u002Funity\u002Fskills-sh\u002F.agents\u002Fskills\u002Funity-cli\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M7FF8RW28TPAJWF8FQPMA105","to-tickets","Break a plan, spec, or the current conversation into a set of tracer-bullet tickets, each declaring its blocking edges, published to the configured tracker (edges as text in one file per ticket locally, or native blocking links on a real tracker).","https:\u002F\u002Fgithub.com\u002Fheynemann\u002Fdotfiles-stow\u002Fblob\u002Fmain\u002Fomp\u002F.omp\u002Fprofiles\u002Funity\u002Fskills-sh\u002F.agents\u002Fskills\u002Fto-tickets\u002FSKILL.md",[],[]]