agentleFS
marblue939marblue939/ai-workflow-skills/skills/unity-commandline-playtest/SKILL.md

unity-commandline-playtest

Skill0 starsChanged 23 days agoMITView on GitHub

需要在不打开编辑器界面的情况下直入某个小游戏/关卡跑一遍并截帧取证时使用,覆盖命令行入口、证据命名、失败判定与常见空跑问题

The file

Files
SKILL.md

命令行直入试玩与取帧

何时触发

  • 需要验证「某个小游戏/关卡能不能正常开局、能不能玩到结算」
  • 需要给一次改动留可回看的画面证据(截图 / 录屏帧)
  • 不想用鼠标在编辑器里点,需要可重复、可脚本化的跑法

输入

  1. 入口方法(直入试玩 / 视觉捕获两类入口分开)
  2. 目标:小游戏编号或关卡 ID、期望结束条件(通关 / 失败 / 限时到)
  3. 证据目录与命名规则(建议:日期_批次_小游戏ID_结果)

步骤

  1. 先跑一次空载:确认编辑器能编译通过再跑业务入口,避免把编译错误当成玩法 bug。
  2. 参数化入口:用 -executeMethod 调用入口方法,目标关卡/时长/输出目录通过命令行参数传入,不在代码里写死。
  3. GUI 模式启动、不加 -quit:入口方法自己退出;加 -quit 会在业务跑完前杀掉进程(详见 unity-editor-verify)。
  4. 等进程真正结束:拿 Unity.exe 的 PID 再 Wait-Process,不要拿「命令返回」当「跑完」。
  5. 证据落盘后再判定:截图/日志文件名必须带目标 ID 与结果;文件存在不等于跑通,要打开看关键帧。
  6. 失败分类:①编译失败 ②入口没被调用(空跑)③开局但卡死 ④跑完但结果不符。四类处理方式不同,不要混成「没跑通」。

验收

  • 证据目录里有本次时间戳的截图/帧
  • 截图里能看到目标小游戏/关卡的实际画面(不是主菜单)
  • 日志有本次运行的开始与结束标记
  • 结果与期望一致,或已按四类分类记录

坑

  • 空跑:入口方法名拼错时编辑器不报错,只是什么都不做——日志里必须有入口打印。
  • 截图时机太早(场景未就绪)会得到纯色画面;至少等一帧渲染完成再截。
  • 用绝对路径存证据,避免工作目录不同导致文件散落找不到。

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.