📦 hera-agenthera-agent-prohera-agent-unity로 통합되었습니다. 모든 기능이 MIT 라이선스로 묶여 제공됩니다. 새 레포 보기 →
오픈소스 · MIT · Unity 6+

AI는 Unity를 추측합니다.
Hera는 직접 봅니다.

AI는 작년 Unity를 외우고 있습니다.
그 차이만큼, 당신은 매번 토큰을 더 씁니다.
hera-agent-unity가 지금 이 Unity를 직접 만집니다.

// AI가 추측한 타입을 Unity에서 직접 확인
hera-agent-unity describe_type UnityEditor.EditorApplication

// 실행 전에 문법 검증으로 재시도 한 번 줄이기
hera-agent-unity exec --check "return Camera.main.name;"

// Play Mode 진입 + 에러 로그 확인을 한 번에
hera-agent-unity editor play --wait && hera-agent-unity console --type error
hera-agent-unity

Quick Start

설치 5분, 첫 명령 1초

1

CLI 설치

curl -fsSL https://raw.githubusercontent.com/NotNull92/hera-agent-unity/main/install.sh | sh
irm https://raw.githubusercontent.com/NotNull92/hera-agent-unity/main/install.ps1 | iex
go install github.com/NotNull92/hera-agent-unity@latest
2

Unity Connector 설치

Package Manager → Add package from git URL

https://github.com/NotNull92/hera-agent-unity.git?path=AgentConnector

Unity 6 (6000.0+) 필수. Connector는 자동으로 시작됩니다.

3

첫 명령

hera-agent-unity status              # 연결 확인
hera-agent-unity editor play --wait  # Play Mode 진입
hera-agent-unity exec "return Camera.main.name;"  # C# 실행
4

AI 에이전트 연동

hera-agent-unity doctor --agent-rules >> CLAUDE.md           # Claude Code
hera-agent-unity doctor --agent-rules >> AGENTS.md           # Codex
hera-agent-unity doctor --agent-rules >> .cursor/rules/hera-agent-unity.mdc   # Cursor
hera-agent-unity doctor --agent-rules >> .github/copilot-instructions.md  # Copilot

어떤 AI 에이전트와도 자유롭게 연동됩니다. MCP에 묶이지 않은 순수 CLI입니다.

Problem

AI는 당신의 Unity를 모릅니다

🎲

API 추측

LLM은 작년 Unity API를 암기합니다. 새 메서드, 폐기된 속성, 프로젝트 전용 코드는 모릅니다.

🔁

실행-실패-재시도 루프

코드를 쓰고 → 컴파일 에러 → 고치고 → 다시 쓰고. 한 세션에 3~5번은 기본입니다.

🌫️

콘솔 에러 추론

에러 로그를 보고 AI가 "아마도 이 문제일 것"이라고 추론합니다. 확신이 없습니다.

📊

성능 추측

Profiler를 GUI로 클릭해서 봐야 합니다. AI는 "아마도 여기가 병목일 것"이라고만 합니다.

Features

24개 도구, 단일 바이너리, zero 런타임 의존성

hera-agent-unity Unity Editor를 터미널에서 직접 제어
core

exec — 런타임 C# 실행

임의 C# 코드를 Unity Editor에서 직접 실행. 전체 API 접근, 컴파일 캐시로 재호출 즉시 응답.

hera-agent-unity exec "return Camera.main.name;"
core

exec --check — 실행 전 문법 검증

코드를 돌리지 않고 문법만 먼저 확인. AI의 "실행 → 실패 → 재시도" 한 바퀴를 걸러냅니다.

hera-agent-unity exec --check "return Camera.main.name;"
core

editor — Play Mode 제어

play, stop, pause, refresh, compile. --wait 플래그로 상태 확정까지 블로킹.

hera-agent-unity editor play --wait
core

console — 로그 골라보기

error/warning/log 필터, stacktrace 제어, clear. GUI 콘솔 열지 않고 터미널에서.

hera-agent-unity console --type error
core

scene — 씬 정보·로드·저장·목록·닫기

활성 씬 정보, Build Settings 등록 씬 목록, additive 로드, 저장, 닫기.

hera-agent-unity scene load Main --mode additive
core

test — EditMode/PlayMode

Unity Test Framework 통합. 필터링, 결과 파일 폴링, domain-reload 안전.

hera-agent-unity test --mode PlayMode --filter MyTest
core

profiler — 성능 분석

Profiler 계층을 GUI 클릭 없이 한 줄로. 정렬·깊이·임계값으로 핫스팟만 직접 가져옵니다.

hera-agent-unity profiler hierarchy --depth 5 --sort self
core

screenshot — 화면 캡처

Scene View 또는 Game View 캡처. 자동화 문서, CI 스크린샷 비교에 활용.

hera-agent-unity screenshot --view game
core

batch — 여러 명령 한 번에

JSON 파일로 여러 명령을 묶어 한 번에 실행. CI/CD에서 왕복 횟수를 줄입니다.

hera-agent-unity batch --file deploy.json
introspection

describe_type — 살아있는 API 보기

지금 돌고 있는 코드에서 타입·메서드·시그니처를 직접 가져옵니다. LLM 학습 cutoff 추측이 아니라 라이브 상태.

hera-agent-unity describe_type UnityEditor.EditorApplication
introspection

find_method — 메서드 직접 검색

로드된 어셈블리에서 메서드를 리플렉션으로 검색. namespace 필터, 시그니처 확인.

hera-agent-unity find_method Refresh --namespace UnityEditor
introspection

list_assemblies — 어셈블리 목록

현재 프로젝트에 로드된 모든 어셈블리를 나열. 버전, 경로 포함.

hera-agent-unity list_assemblies
introspection

unity_docs — 오프라인 Unity 문서

Unity ScriptReference를 오프라인으로 조회. 네트워크 없이, Unity 버전에 맞는 정확한 API 정보.

hera-agent-unity unity_docs GameObject
gameobject

manage_gameobject — 게임오브젝트 CRUD

생성, 삭제, 이름 변경, 부모 설정, 활성화/비활성화. HierarchyPath로 정확한 경로 지정.

hera-agent-unity manage_gameobject create --name Player --parent /World
gameobject

find_gameobjects — 오브젝트 검색

이름, 태그, 컴포넌트로 게임오브젝트를 검색. inactive 오브젝트도 포함 옵션.

hera-agent-unity find_gameobjects --name Enemy --inactive
gameobject

manage_components — 컴포넌트 CRUD

컴포넌트 추가, 제거, 속성 수정. SerializedProperty 경로로 깊은 속성까지 접근.

hera-agent-unity manage_components --target Player --add Rigidbody
asset

manage_material — 머티리얼 편집

쉐이더 속성 조회, 머티리얼 생성/수정. 색상, 텍스처, 벡터 값 설정.

hera-agent-unity manage_material --create NewMat --shader URP/Lit
asset

manage_prefab — 프리팹 관리

프리팹 생성, 인스턴스화, 컴포넌트 추가/제거. PrefabStage 없이 headless로.

hera-agent-unity manage_prefab --create-from Player --path Assets/Prefabs
asset

describe_shader — 쉐이더 속성 조회

쉐이더의 property 이름, 타입, display label, range를 확인. 머티리얼 편집 전 필수.

hera-agent-unity describe_shader URP/Lit --list
asset

manage_asset_import — 임포트 설정

TextureImporter, ModelImporter 등의 임포트 설정을 SerializedProperty로 직접 수정.

hera-agent-unity manage_asset_import --path Assets/Textures --set textureType Sprite
ui

manage_ui — uGUI 오서링

Canvas, Panel, Button, Text 등 uGUI 요소 생성. RectTransform anchor/pivot/preset 설정.

hera-agent-unity manage_ui create --type button --text "Start"
package

manage_packages — UPM 패키지 관리

패키지 설치, 제거, 임베드. git URL, registry, 로컬 파일 모두 지원.

hera-agent-unity manage_packages add com.unity.cinemachine
custom

내 도구 ([HeraTool])

C# 클래스에 [HeraTool] 속성을 붙이면 자동으로 CLI 명령이 됩니다. 프로젝트 전용 도구를 쉽게 추가.

hera-agent-unity list # 등록된 도구 목록 확인

How It Works

복잡한 건 숨기고, 간단한 것만 보여줍니다

터미널
Go 바이너리 하나
hera-agent-unity exec "..."
HTTP
localhost:8090
POST /command
Unity Editor
C# Connector 자동 시작
[HeraTool] 실행

Unity Editor가 열리면 C# Connector가 자동으로 localhost HTTP 서버를 시작합니다.
Go CLI는 heartbeat 파일을 읽어 Unity를 발견하고, 명령을 JSON으로 복사해 실행합니다.
스크립트 컴파일로 인한 domain reload에도 서버가 자동 재시작되어 연결이 끊기지 않습니다.

Benchmark

실제 AI 에이전트 사용 패턴 기준 측정

~1,622
50회 exec 호출 토큰
70%
응답이 5바이트 이하
$0.03
Claude Sonnet 세션당

AI 에이전트(Claude Code · Codex 등)에서 hera-agent-unity를 도구로 호출했을 때를 직접 측정한 결과입니다.

실 사용 패턴 exec C# 50회 호출 기준으로 총 6,568 bytes (~1,622 토큰).
응답의 70%가 5바이트(OK\n) 이하 — 도구 비용은 사실상 노이즈입니다.
토큰 대부분은 에이전트가 짠 C# 코드(입력)에 있습니다.

자세한 측정 환경과 시나리오는 Benchmark 보고서를 참고하세요.

FAQ

Unity 6000.0 (Unity 6) 이상이 필요합니다. Unity 2022 LTS나 2021 LTS는 지원하지 않습니다.

아닙니다. Go로 만든 실행 파일 하나라서요. Unity 쪽은 UPM 패키지로 설치하면 끝입니다. 런타임이나 서버를 따로 띄울 필요 없습니다.

유지됩니다. 스크립트가 다시 컴파일되면 서버도 재시작되지만, hera-agent-unity가 알아서 새 포트를 찾습니다. 따로 만질 게 없습니다.

네. hera-agent-unity는 어떤 AI 코딩 에이전트와도 같이 씁니다 — Claude Code · Codex · Cursor · Copilot · Continue.dev. 사용하는 에이전트의 규칙 파일에 lean 룰 셋을 한 번 append:

hera-agent-unity doctor --agent-rules >> CLAUDE.md           # Claude Code
hera-agent-unity doctor --agent-rules >> AGENTS.md           # Codex
hera-agent-unity doctor --agent-rules >> .cursor/rules/hera-agent-unity.mdc   # Cursor
hera-agent-unity doctor --agent-rules >> .github/copilot-instructions.md  # Copilot
hera-agent-unity doctor --agent-rules >> .continuerules     # Continue.dev

전체 사용 가이드는 레포 루트의 AGENT.md (~3.4K 토큰)에 있습니다. hera-agent-unity는 MCP에 묶이지 않은 순수 CLI라, 어떤 셸·스크립트에서든 자유롭게 호출 가능합니다.

hera-agent-unity로 마이그레이션하세요. 모든 Pro 기능이 MIT 라이선스로 묶여 제공됩니다. CLI 명령어만 hera-agenthera-agent-unity로 바꾸면 됩니다. UPM URL도 hera-agent-unity.git로 변경하세요.

AI 에이전트(Claude Code · Codex 등)에서 hera-agent-unity를 도구로 호출했을 때를 직접 측정한 결과입니다. 실 사용 패턴 exec C# 50회 호출 기준으로 총 ~1,622 토큰. Claude Sonnet 단가로 세션당 $0.03 이하 — 매일 5세션 30일이면 월 $5 이내 수준입니다. 응답의 70%가 5바이트(OK\n) 이하라 도구 비용은 사실상 노이즈, 토큰 대부분은 에이전트가 짠 C# 코드(입력)에 있습니다.

C# 클래스에 [HeraTool]을 붙이면 자동으로 인식됩니다. Parameters 클래스로 인자를 잡고, HandleCommand 메서드 안에 로직을 쓰면 됩니다. hera-agent-unity list로 잘 등록됐는지 확인할 수 있습니다.

다음 한 줄이 컴파일에서 죽지 않게

설치 5분, 첫 명령 1초. AI의 다음 작업이 추측에서 실측으로 바뀝니다.

GitHub에서 받아가기 → ↓ 설치 가이드