소스 정보
- 저장소
- Besty0728/Unity-Skills
- 최근 소스 활동
- 2026년 8월 16일 06:26
- 감지된 SKILL.md 언어
- 다국어 혼합
- 스타
- 1,697
- 포크
- 162
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/Besty0728/Unity-Skills --skill unity-physics명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Automate the Unity Editor through a local REST API — create and edit scripts, build scenes and prefabs, manage assets/materials/lighting, run tests, and drive hundreds of Editor operations across modules. Use when the user wants to actually operate the Unity Editor from chat — create or modify GameObjects/scripts/scenes/assets, batch-edit, or run Editor automation — in any language. Not needed for conceptual Unity Q&A that touches no Editor state — read the matching advisory doc under skills/ instead. 当用户要从对话里实际操作 Unity 编辑器(创建/修改/批量编辑/运行测试)时使用,任何语言均可触发;纯概念问答无需本协议。
Unified batch and async-job orchestration
Index of all Unity Skills modules with per-module mode labels (SA/FA/Mixed). Use to find which module covers a task before loading its doc.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | unity-physics |
| description | Run Unity physics queries and configure physics |
Before calling any skill in this module: if you are about to call a skill with parameters guessed from its name or description, STOP — read this file (or fetch its schema via
GET /skills/recommend?includeSchema=true) first. If you already have the parameter definitions from recommend/schema, you may proceed straight to dryRun.
Editor-time physics queries (raycast / overlap), gravity, PhysicMaterial assets, and layer collision matrix.
physics_raycast / physics_check_overlap / physics_get_gravity / physics_get_layer_collision 等,源码标 SkillMode.SemiAuto)直接执行;变更类(physics_set_gravity / physics_create_material / physics_set_material / physics_set_layer_collision,标 SkillMode.FullAuto)需用户 grant,grant 后服务端一步执行返结果。DO NOT (common hallucinations):
physics_add_rigidbody / physics_add_collider do not exist → use component_add with componentType "Rigidbody"/"BoxCollider"/etc.physics_simulate does not exist → physics simulation runs during Play mode; this module does not step the simulationRouting:
component modulephysics_create_material (this module)physics_set_layer_collision (this module)physics_raycastCast a ray and get hit info. Parameters:
originX, originY, originZ (float): Origin point.dirX, dirY, dirZ (float): Direction vector.maxDistance (float, optional): Max distance (default 1000).layerMask (int, optional): Layer mask (default -1).Returns: { hit: true, collider: "Cube", distance: 5.2, ... }
physics_check_overlapCheck for colliders in a sphere. Parameters:
x, y, z (float): Center point.radius (float): Sphere radius.layerMask (int, optional): Layer mask.physics_get_gravityGet global gravity setting. Parameters: None.
physics_set_gravitySet global gravity setting. Parameters:
x, y, z (float): Gravity vector (e.g. 0, -9.81, 0).physics_raycast_allCast a ray and return ALL hits (penetrating).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| originX | float | Yes | - | Ray origin X |
| originY | float | Yes | - | Ray origin Y |
| originZ | float | Yes | - | Ray origin Z |
| dirX | float | Yes | - | Direction X |
| dirY | float | Yes | - | Direction Y |
| dirZ | float | Yes | - | Direction Z |
| maxDistance | float | No | 1000 | Max ray distance |
| layerMask | int | No | -1 | Layer mask filter |
Returns: { count, hits: [{ objectName, instanceId, path, point, normal, distance }] }
physics_spherecastCast a sphere along a direction and get hit info.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| originX | float | Yes | - | Origin X |
| originY | float | Yes | - | Origin Y |
| originZ | float | Yes | - | Origin Z |
| dirX | float | Yes | - | Direction X |
| dirY | float | Yes | - | Direction Y |
| dirZ | float | Yes | - | Direction Z |
| radius | float | Yes | - | Sphere radius |
| maxDistance | float | No | 1000 | Max cast distance |
| layerMask | int | No | -1 | Layer mask filter |
Returns: { hit, objectName, instanceId, point, distance }
physics_boxcastCast a box along a direction and get hit info.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| originX | float | Yes | - | Origin X |
| originY | float | Yes | - | Origin Y |
| originZ | float | Yes | - | Origin Z |
| dirX | float | Yes | - | Direction X |
| dirY | float | Yes | - | Direction Y |
| dirZ | float | Yes | - | Direction Z |
| halfExtentX | float | No | 0.5 | Box half extent X |
| halfExtentY | float | No | 0.5 | Box half extent Y |
| halfExtentZ | float | No | 0.5 | Box half extent Z |
| maxDistance | float | No | 1000 | Max cast distance |
| layerMask | int | No | -1 | Layer mask filter |
Returns: { hit, objectName, instanceId, point, distance }
physics_overlap_boxCheck for colliders overlapping a box volume.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| x | float | Yes | - | Box center X |
| y | float | Yes | - | Box center Y |
| z | float | Yes | - | Box center Z |
| halfExtentX | float | No | 0.5 | Box half extent X |
| halfExtentY | float | No | 0.5 | Box half extent Y |
| halfExtentZ | float | No | 0.5 | Box half extent Z |
| layerMask | int | No | -1 | Layer mask filter |
Returns: { count, colliders: [{ objectName, path, isTrigger }] }
physics_create_materialCreate a PhysicMaterial asset.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| name | string | No | "New PhysicMaterial" | Material name |
| savePath | string | No | "Assets" | Save directory path |
| dynamicFriction | float | No | 0.6 | Dynamic friction value |
| staticFriction | float | No | 0.6 | Static friction value |
| bounciness | float | No | 0 | Bounciness value |
Returns: { success, path }
physics_set_materialSet PhysicMaterial on a collider (supports name/instanceId/path).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| materialPath | string | Yes | - | Asset path of the PhysicMaterial |
| name | string | No | null | GameObject name |
| instanceId | int | No | 0 | GameObject instance ID |
| path | string | No | null | GameObject hierarchy path |
Returns: { success, gameObject, material }
physics_get_layer_collisionGet whether two layers collide.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| layer1 | int | Yes | - | First layer index |
| layer2 | int | Yes | - | Second layer index |
Returns: { layer1, layer2, collisionEnabled }
physics_set_layer_collisionSet whether two layers collide.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| layer1 | int | Yes | - | First layer index |
| layer2 | int | Yes | - | Second layer index |
| enableCollision | bool | No | true | Whether to enable collision |
Returns: { success, layer1, layer2, collisionEnabled }
import unity_skills
# Raycast from position downward, check for hits
result = unity_skills.call_skill("physics_raycast",
originX=0, originY=5, originZ=0,
dirX=0, dirY=-1, dirZ=0,
maxDistance=10
)
if result.get("hit"):
print(f"Hit: {result['hitObjectName']} at distance {result['distance']}")
Exact names, parameters, defaults, and returns are defined by GET /skills/schema or unity_skills.get_skill_schema(), not by this file.
Full transport-level codes (COMPILING/RATE_LIMIT etc.) → ../../references/protocol-error-codes.md
| Error | Trigger | Fix |
|---|---|---|
SEMANTIC_INVALID | An invalid value was supplied, such as a zero direction vector, a name containing path separators, or an out-of-range parameter. | Provide a non-zero direction, remove path separators from the material name, and clamp values to the valid range. |
TARGET_NOT_FOUND | The target GameObject has no Collider, or the requested PhysicMaterial asset could not be loaded. | Add a collider via component_add or verify the material path with asset_find, then retry. |
MISSING_PARAM | A required parameter is missing, such as name in physics_create_material. | Provide the parameter named in the error; use mode=dryRun for the schema. |