← Catalog

@aefree/pi-unity

Native Unity CLI and Pipeline guidance, Unity project discovery, and optional Pi integrations.

Extension

Install

Install with PiG

pig install npm:@aefree/pi-unity

Install with Pi

pi install npm:@aefree/pi-unity
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "skills": [
    "./skills"
  ],
  "extensions": [
    "./index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.17.1 (README.md). PiG does not review it.

Pi Unity

Use Unity's own CLI and Pipeline from Pi. Agents get a read-only project finder; users get /unity-open to open the right workspace copy without typing its full path.

Install

pi install npm:@aefree/pi-unity

Install Unity CLI separately. /unity-open requires unity on PATH. Otherwise, invoke the CLI by its absolute executable path in the shell. The native guidance targets Unity CLI and com.unity.pipeline 1.0.1. Use installed help and the exact Editor's advertised commands rather than assuming every project runs the same Pipeline version.

Open the Editor from Pi

Type /unity-open inside a Unity project or from its workspace directory to open the project picker. It highlights the first match, and shows nearby copies by relative path (for example, ws1/Game and ws2/Game) so projects with the same name are easy to tell apart. Use ↑/↓ to choose a copy, Tab to switch between Normal and Automated, Enter to open it, or Esc to cancel.

To narrow the search or reach another workspace, supply a directory: /unity-open ../ws2/Game or /unity-open "C:\Unity Workspaces\ws2\Game". The picker starts in Normal mode each time. Automated passes Unity Editor’s -automated flag; it still opens a GUI, not batch mode. Pi passes the chosen absolute project path to native unity open. It doesn't remember your selection, change Pi's working directory, wait for Editor readiness, or close other Editors. Use Unity CLI directly for other launch options or scripting.

Find a project copy

unity_find_projects searches from the current directory or a supplied existing directory. It returns the nearest containing Unity project if found; otherwise it searches nearby descendants, excluding common generated directories and directory links and stopping at project roots. A candidate has a ProjectVersion.txt file plus an Assets directory or package manifest. Results contain canonical absolute roots, not a persistent selection or running Editor status. Descendant discovery is bounded to depth 4, 400 directories, 4,096 entries, and 20 candidates. A truncated or incomplete search cannot establish uniqueness. If a closer ancestor cannot be checked, the finder does not infer that an outer copy is the intended project. Skip discovery if the exact root is already known.

Use native unity open <root>, unity status --project-path <root>, and unity close <root> for Editor lifecycle. Requested close exits without saving; the user owns the save decision. When multiple agents share a copy, designate one operator through actual operation completion and evidence capture.

Upgrade from the wrapper-based package

Update project agent instructions or scripts that refer to removed Pi tools or slash commands. The new /unity-open is a user-facing shortcut, not a replacement for the former execution tools or launch settings. Use native CLI and Pipeline commands for execution, unity_find_projects for copy discovery, and native test results or reports instead of pi-unity-tests-*.json. The old launch and close settings no longer apply. See 0.17.0 changes for the removal list and the workflow skill for replacements.

Included skills

Optional Pi integrations

With pi-file-discovery, broad searches exclude Unity-generated directories; explicitly targeted generated directories remain searchable. With pi-project-artifacts, Unity fields such as Editor version, package list and render pipeline are available for indexing and validation of solution and memory artifacts. These integrations register per session; neither is required for project discovery.

Development

From this package root, run npm ci, npm test, and npm pack --dry-run. The manifest and lockfile pin Pi validation dependencies. Package tests do not start Unity.