跳到正文
cccskills
免费在 GitHub 公开

unity-editor-remote

Drive running Unity Editor from shell to verify compiles, playmode, scenes, screenshots. Use when editing C# scripts, scenes, or assets in a Unity project and needing to: (1) check compilation succeeds, (2) read console errors, (3) enter/exit Play mode, (4) capture screenshots or frame recordings, (5) select objects or aim the Scene camera, (6) query editor window layout. Injects a file-polling command bridge (UnityRemote.cs) — prefer this over batchmode (fights the Library lock) or GUI automation.

中文简介正在准备中。当前显示原文说明。

集成工具Unity
查看安装方法

包含的文件(7)

  • SKILL.md3.6 KB
  • assets/UnityRemote.cs14.6 KB
  • assets/UnityRemoteRecorder.cs3.0 KB
  • references/caveats.md2.9 KB
  • references/commands.md3.2 KB
  • scripts/kwin_focus_unity.js966 B
  • scripts/unity_cmd.sh2.9 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Unity Editor Remote

Control a running Unity Editor via a file-polling command bridge. No window clicking, no second editor process.

Protocol

Agent writes <project>/UnityRemote.txt (one command per line, # comments allowed). Editor polls every 0.5 s, executes lines, writes <project>/UnityRemote.result.txt, deletes the command file. Commands are skipped while compiling/updating — wait, never resend.

Full command list with argument formats: references/commands.md.

Setup

  1. Detect bridge: check <project>/Assets/UnityRemote.cs. Some projects ship their own variant — grep Assets/**/Editor/*.cs for a command-file poller before deploying.
  2. Deploy if missing: copy assets/UnityRemote.cs (and assets/UnityRemoteRecorder.cs for record) into Assets/, then run refresh to import + compile. An unfocused editor defers asset import — if refresh times out, focus the editor window, then retry. Confirm with ping.
  3. Send commands:
scripts/unity_cmd.sh <project-root> "ping"                  # single command
scripts/unity_cmd.sh <project-root> -t 600 "refresh" "ping" # batch with timeout

Verification Loop (after code change)

U=<skill-dir>/scripts/unity_cmd.sh
$U "$P" --compile            # refresh → busy-poll until idle → console tail
                             # 'error CS' = fail; 'console empty' = clean
$U "$P" "play"               # enter Play mode
sleep 8                      # let systems tick
$U "$P" "state"              # playing? MonoBehaviours present? (objs=...)
$U "$P" "errors 50"          # runtime exceptions
$U "$P" "stop"

Critical: never trust refresh+ping as a compile gate. refresh returns before recompile starts — same-batch ping/errors answer from the OLD assembly. Use --compile (busy-poll + gen-change check).

Visual Verification

screenshot [relpath] renders the main camera synchronously → PNG at <project>/<relpath>. Captures the Game camera, not editor chrome.

record [sec] [fps] enters Play mode, captures frames → Recordings/shot/frame_####.png + done.txt. Requires assets/UnityRemoteRecorder.cs deployed.

Use layout for window rects + pixelsPerPoint if cropping is needed. OS-level screen capture is unreliable — only use it for editor chrome itself.

Telemetry pattern: errors is the only data channel out of Play mode. Make runtime code log structured single-line events (e.g., Debug.Log($"GAME round={r} score={s}")), then grep errors output. Pass large n (50+) to avoid early entries scrolling out.

Key Rules

  • One editor per project — the running editor owns the Library lock. Never launch -batchmode on the same project.
  • Play mode = domain reload — assemblies reload; bridge re-inits. Always --compile green first.
  • Bridge is editor-only — never shipped in builds. Commit it or .gitignore per user preference.

For occlusion caveats, timeout behavior, domain-reload edge cases, and troubleshooting: see references/caveats.md.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Add SLSA build-provenance attestations to existing GitHub Actions workflows. Use when the user wants to add artifact attestations, build provenance, or SLSA attestations to Docker container image builds in GitHub Actions CI/CD pipelines.

中文简介正在准备中。当前显示原文说明。

jim60105/copilot-prompt222026年10月16日 更新

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.

中文简介正在准备中。当前显示原文说明。

jim60105/copilot-prompt222026年10月16日 更新

Guideline for designing, implementing, and verifying secure APIs following OWASP API Security Top 10 (2023) best practices. Use when the user wants to: (1) review API code or design for security vulnerabilities, (2) design a secure REST, GraphQL, or gRPC API architecture, (3) implement API authentication and authorization (OAuth2, JWT, API keys, mTLS), (4) configure rate limiting, input validation, or CORS, (5) audit API endpoints for BOLA, BFLA, or mass assignment vulnerabilities, (6) create API security checklists or verification plans, (7) fix API security bugs or harden existing APIs, (8) set up API security testing (OWASP ZAP, Schemathesis, Burp Suite), or (9) handle any API security concern including SSRF prevention, resource consumption limits, business flow protection, API inventory management, and secure third-party API consumption.

中文简介正在准备中。当前显示原文说明。

jim60105/copilot-prompt222026年10月16日 更新

Write, review, and optionally test Bash and Zsh shell scripts following project coding standards. Use for ANY shell scripting task: (1) creating a new Bash or Zsh script, (2) editing, fixing, or reviewing an existing .sh, .bash, or .zsh file, (3) adding error handling, dependency checks, or cleanup traps to shell scripts, (4) implementing API integration or file processing in shell, (5) writing or fixing ShellSpec tests (spec/*_spec.sh), or (6) deciding whether a script should be written in Bash or Zsh. Defaults to Bash; Zsh-specific guidance lives in a reference file that is loaded only when writing Zsh.

中文简介正在准备中。当前显示原文说明。

jim60105/copilot-prompt222026年10月16日 更新

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

中文简介正在准备中。当前显示原文说明。

jim60105/copilot-prompt222026年10月16日 更新

Create, run, and maintain API test collections using Bruno (OpenCollection YAML format and legacy Bru format). Use when the user wants to: (1) create a Bruno API test collection from scratch or from OpenAPI/Swagger specs, (2) write API request files with tests and assertions, (3) run API tests using bru CLI, (4) generate test reports (HTML, JUnit, JSON), (5) set up CI/CD pipelines (GitHub Actions) for automated API testing, (6) debug or fix failing Bruno API tests, (7) add environment configurations for API testing, (8) chain API requests with data extraction, or (9) work with any .yml/.bru Bruno collection files. Triggers on mentions of 'Bruno', 'bru CLI', 'API testing collection', 'OpenCollection', or requests to automate API testing with file-based collections.

中文简介正在准备中。当前显示原文说明。

jim60105/copilot-prompt222026年10月16日 更新

查看 jim60105 的全部技能

报告此技能的问题