Przejdź do treści
Biblioteka skilli
Programowanie · Automatyzacja

unity-run

/unity-run

Uruchamia Unity z CLI w trybie batchmode: buildy, testy, wykonanie metod i import zasobów z monitorowaniem logów.

Repozytorium
agent-plugins ↗
Licencja
MIT
Ostatnia zmiana repozytorium
26.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Uruchamia Unity z CLI w trybie batchmode: buildy, testy, wykonanie metod i import zasobów z monitorowaniem logów.

Oryginalny opis (EN)

Use when running Unity from CLI for any purpose — builds, tests, method execution, asset imports. Handles Unity installation detection, batchmode execution, and log monitoring. Other unity-dev skills depend on this for CLI execution.

Jak działa

  1. Step 1: Find the Unity project
  2. Step 2: Detect Unity installation
  3. Step 3: Build and run the command
  4. Step 4: Report results
  5. Common flags reference
  6. Platform notes
Sekcje z nagłówków SKILL.md, w oryginale · 66 linii, 436 słów
Podgląd SKILL.md
---
name: unity-run
description: Use when running Unity from CLI for any purpose — builds, tests, method execution, asset imports. Handles Unity installation detection, batchmode execution, and log monitoring. Other unity-dev skills depend on this for CLI execution.
---

# Run Unity CLI

Execute Unity in batchmode from the command line. This skill handles finding the Unity installation and constructing the CLI command. Calling skills (tests, builds) provide the specific flags.

## Step 1: Find the Unity project

Starting from the current working directory, locate `ProjectSettings/ProjectVersion.txt` by walking up or using Glob. The directory containing `ProjectSettings/` is the project root.

If the user provides a project path explicitly, use that instead.

## Step 2: Detect Unity installation

Use the plugin's detection script:

Locate this installed `SKILL.md` through the current host's skill metadata or file tools. Resolve `../..` from its directory to get the absolute plugin root. Replace `<absolute-plugin-root>` below with that path and verify `scripts/find-unity.sh` exists. If the resource is unavailable, report the missing path and stop; do not assume a host environment variable supplies it.

```bash
UNITY_PATH=$("<absolute-plugin-root>/scripts/find-unity.sh" "<project-root>")
```

The script auto-detects Unity via Hub config, default paths, and Hub CLI fallback. It reads the project's `ProjectVersion.txt` to find the matching editor version.

If detection fails, ask the user to set `UNITY_EDITOR_PATH` environment variable.

## Step 3: Build and run the command

Construct the Unity CLI command with batchmode defaults:

```bash
"$UNITY_PATH" -batchmode -projectPath "<project-root>" <caller-flags> -logFile - [-quit]
```

**Defaults (always include unless caller overrides):**
- `-batchmode` — no GUI
- `-projectPath` — the detected project root
- `-logFile -` — stream log to stdout (use a file path if caller needs to parse logs separately)
- `-quit` — exit after execution. Omit it with `-runTests`: the test runner exits on its own, and with `-quit` Unity can exit before the tests run

**Caller provides:** the purpose-specific flags (e.g., `-runTests`, `-buildTarget`, `-executeMethod`).

**Timeout:** Set to 600000ms (10 minutes) by default. Builds may need longer — caller can override.

## Step 4: Report results

After execution:
- Report Unity exit code (0 = success, non-zero = failure)
- If `-logFile -` was used, relevant log output is already in stdout
- If a log file was used, read the last 50 lines on failure for diagnostics

## Common flags reference

| Purpose | Flags |
|---------|-------|
| Run tests | `-runTests -testPlatform EditMode -testResults <path>` |
| Android build | `-buildTarget Android -executeMethod <method>` |
| iOS build | `-buildTarget iOS -executeMethod <method>` |
| Execute method | `-executeMethod <ClassName.MethodName>` |
| Import assets | `-importPackage <path>` |
| No graphics | `-nographics` (add for headless servers) |

## Platform notes

- **Windows:** Unity path uses forward slashes in bash. The detection script handles conversion.
- **PATH inheritance:** Unity inherits PATH from its parent process (Unity Hub). After PATH changes, restart Hub + Editor.

Wersje

W bazie nie ma innych skilli o nazwie unity-run.

Migawka bazy z 13.11.2026 · wersja paczki fc36d6eac6a3 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 88unity-batchmode
    Uruchamia Unity bez interfejsu: testy EditMode i PlayMode, budowanie gry przez skrypt z kodem wyjścia i sprawdzanie kompilacji, a także czyta logi.
  • 90unity-build
    Generuje i sprawdza projekty Unity 2022.3 LTS, w tym skrypty C#, szkielet projektu i build wsadowy.
  • 100unity-dev
    Prowadzi funkcje i poprawki w C# w Unity: architekturę, implementację, przegląd i testy.
  • 100unity-editor-tooling
    Obsługuje skryptowanie Unity Editor: własne Inspektory, PropertyDrawers, EditorWindow, MenuItems, postprocesory assetów, Editor Coroutines i buildy z -batchmode -executeMethod.
  • 90unity-verification
    Sprawdza, czy zmiana w Unity się kompiluje i działa, uruchamia testy, buduje grę i wykonuje kod w edytorze.
  • 90unity-asset-import
    Importuje modele i tekstury do Unity z ustawieniami dla platform i metadanymi zgodnymi z projektem.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.