返回 Skill 列表
extension
分类: 开发与工程无需 API Key

unity-testability

Unity测试性顾问。当用户希望提高测试性、将纯逻辑与Unity API隔离开来、决定哪些内容应属于编辑模式或播放模式测试,或者减少难以测试的MonoBehaviour逻辑时使用。触发词:testability, unit test, editmode, playmode, isolate logic, 测试性, 单元测试.

person作者: jakexiaohubgithub

Unity Testability Advisor

Use this skill when deciding what logic should remain in Unity-facing classes and what should move into pure C# code.

Review Questions

  • Can the rule/algorithm run without Transform, GameObject, or scene state?
  • Can config be injected instead of read through static globals?
  • Can runtime decisions be moved to a plain C# class and called from a thin MonoBehaviour?
  • Does this need PlayMode coverage, or is EditMode enough?

Output Format

  • Logic that should move to pure C#
  • Logic that should stay Unity-facing
  • Suggested seams/interfaces
  • Candidate EditMode tests
  • Candidate PlayMode tests

Guardrails

Mode: Both (Semi-Auto + Full-Auto) — advisory only, no REST skills

  • Do not force test seams everywhere if the script is tiny and scene-bound.
  • Prefer a few meaningful seams over abstraction for its own sake.