/light
Create and configure Unity lights. 创建与配置 Unity 灯光。
$ npx -y skills add Besty0728/Unity-Skills --skill light --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/light
Context preview
The summary Claude sees to decide when to auto-load this skill.
Create and configure Unity lights. 创建与配置 Unity 灯光。
SKILL.md
light.SKILL.mdname: unity-light
description: Create and configure Unity lights. 创建与配置 Unity 灯光。
Triggers
- Adding or tuning lights
- Setting up scene lighting
- Batch-enabling/disabling lights
- 添加或调校灯光、布置场景照明、批量开关灯光
Unity Light Skills
> **BATCH-FIRST**: Use `*_batch` skills when operating on 2+ lights.
Operating Mode
- **Approval** (default): mutating skills (`light_create`, `light_set_properties`, `light_set_properties_batch`, `light_set_enabled`, `light_set_enabled_batch`, `light_add_probe_group`, `light_add_reflection_probe`) need user grant; grant triggers a single server-side execution that returns the result.
- **Auto / Bypass**: those skills execute directly.
- Query skills (`light_get_info`, `light_find_all`, `light_get_lightmap_settings`) are `SkillMode.SemiAuto` — they run in all three modes without grant.
- This module contains **no** Delete / PlayMode / Reload / high-risk skills (no NeverInSemi); to remove a Light, call `gameobject_delete` from the `gameobject` module.
Guardrails
**DO NOT** (common hallucinations):
- `light_add` does not exist → use `light_create` (creates a new light GameObject)
- `light_set_color` / `light_set_intensity` do not exist → use `light_set_properties` (sets color, intensity, range, shadows together)
- `light_delete` does not exist → use `gameobject_delete` on the light's GameObject
- `light_set_shadow` does not exist → use `light_set_properties` with `shadows` parameter ("none"/"hard"/"soft")
**Routing**:
- For lightmap baking settings → `light_get_lightmap_settings` (this module)
- For reflection probes → `light_add_reflection_probe` (this module)
- For light probe groups → `light_add_probe_group` (this module)
> **Object Targeting**: All single-object skills accept `name` (string) and `instanceId` (int, preferred). Provide at least one. `path` (hierarchy path) is also accepted where noted.
Skills Overview
| Single Object | Batch Version | Use Batch When | |---------------|---------------|----------------| | `light_set_properties` | `light_set_properties_batch` | Configuring 2+ lights | | `light_set_enabled` | `light_set_enabled_batch` | Toggling 2+ lights |
**No batch needed**:
- `light_create` - Create a light
- `light_get_info` - Get light information
- `light_find_all` - Find all lights (returns list)
- `light_add_probe_group` - Add a Light Probe Group with optional grid layout
- `light_add_reflection_probe` - Create a Reflection Probe at a position
- `light_get_lightmap_settings` - Inspect Lightmap baking settings
---
Light Types
| Type | Description | Use Case | |------|-------------|----------| | `Directional` | Parallel rays, no position | Sun, moon | | `Point` | Omnidirectional from a point | Torches, bulbs | | `Spot` | Cone-shaped beam | Flashlights, spotlights | | `Area` | Rectangle/disc (baked only) | Windows, soft lights |
---
Skills
light_create
Create a new light.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `name` | string | No | "New Light" | Light name | | `lightType` | string | No | "Point" | Directional/Point/Spot/Area | | `x`, `y`, `z` | float | No | 0,3,0 | Position | | `r`, `g`, `b` | float | No | 1,1,1 | Color (0-1) | | `intensity` | float | No | 1 | Light intensity | | `range` | float | No | 10 | Range (Point/Spot) | | `spotAngle` | float | No | 30 | Cone angle (Spot only) | | `shadows` | string | No | "soft" | none/hard/soft |
**Returns**: `{success, name, instanceId, lightType, position, color, intensity, shadows}`
light_set_properties
Configure light properties.
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `name` | string | No* | Light object name | | `instanceId` | int | No* | Instance ID (preferred) | | `r`, `g`, `b` | float | No | Color (0-1) | | `intensity` | float | No | Light intensity | | `range` | float | No | Range (Point/Spot) | | `spotAngle` | float | No | Cone angle (Spot only) | | `shadows` | string | No | none/hard/soft |
**Returns**: `{success, name, lightType, color, intensity, range, spotAngle, shadows}`
light_set_properties_batch
Configure multiple lights. Each item accepts: `name`/`instanceId`/`path` (identifier) + `r`, `g`, `b`, `intensity`, `range`, `shadows` (all optional). | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `items` | json string | Yes | - | JSON array of per-item objects (see example below) |
**Returns**: `{success, totalItems, successCount, failCount, results: [{success, name}]}`
unity_skills.call_skill("light_set_properties_batch", items=[
{"name": "Light1", "intensity": 2.0, "r": 1, "g": 0.9, "b": 0.8},
{"instanceId": 12345, "intensity": 1.5, "shadows": "soft"},
{"name": "Light3", "intensity": 2.0}
])light_set_enabled
Enable or disable a light.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `name` | string | No* | - | Light object name | | `instanceId` | int | No* | - | Instance ID | | `path` | string | No* | - | Hierarchy path | | `enabled` | bool | No | `true` | Enable state |
**Returns**: `{success, name, enabled}`
light_set_enabled_batch
Enable or disable multiple lights. | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `items` | json string | Yes | - | JSON array of per-item objects (see example below) |
**Returns**: `{success, totalItems, successCount, failCount, results: [{success, name, enabled}]}`
unity_skills.call_skill("light_set_enabled_batch", items=[
{"name": "Torch1", "enabled": False},
{"name": "Torch2", "enabled": False},
{"name": "Torch3", "enabled": False}
])light_get_info
Get detailed light information.
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `name` | string | No* | Ligh
Read more
name: unity-light description: Create and configure Unity lights. 创建与配置 Unity 灯光。
Triggers
- Adding or tuning lights
- Setting up scene lighting
- Batch-enabling/disabling lights
- 添加或调校灯光、布置场景照明、批量开关灯光
Unity Light Skills
> **BATCH-FIRST**: Use `*_batch` skills when operating on 2+ lights.
Operating Mode
- **Approval** (default): mutating skills (`light_create`, `light_set_properties`, `light_set_properties_batch`, `light_set_enabled`, `light_set_enabled_batch`, `light_add_probe_group`, `light_add_reflection_probe`) need user grant; grant triggers a single server-side execution that returns the result.
- **Auto / Bypass**: those skills execute directly.
- Query skills (`light_get_info`, `light_find_all`, `light_get_lightmap_settings`) are `SkillMode.SemiAuto` — they run in all three modes without grant.
- This module contains **no** Delete / PlayMode / Reload / high-risk skills (no NeverInSemi); to remove a Light, call `gameobject_delete` from the `gameobject` module.
Guardrails
**DO NOT** (common hallucinations):
- `light_add` does not exist → use `light_create` (creates a new light GameObject)
- `light_set_color` / `light_set_intensity` do not exist → use `light_set_properties` (sets color, intensity, range, shadows together)
- `light_delete` does not exist → use `gameobject_delete` on the light's GameObject
- `light_set_shadow` does not exist → use `light_set_properties` with `shadows` parameter ("none"/"hard"/"soft")
**Routing**:
- For lightmap baking settings → `light_get_lightmap_settings` (this module)
- For reflection probes → `light_add_reflection_probe` (this module)
- For light probe groups → `light_add_probe_group` (this module)
> **Object Targeting**: All single-object skills accept `name` (string) and `instanceId` (int, preferred). Provide at least one. `path` (hierarchy path) is also accepted where noted.
Skills Overview
| Single Object | Batch Version | Use Batch When | |---------------|---------------|----------------| | `light_set_properties` | `light_set_properties_batch` | Configuring 2+ lights | | `light_set_enabled` | `light_set_enabled_batch` | Toggling 2+ lights |
**No batch needed**:
- `light_create` - Create a light
- `light_get_info` - Get light information
- `light_find_all` - Find all lights (returns list)
- `light_add_probe_group` - Add a Light Probe Group with optional grid layout
- `light_add_reflection_probe` - Create a Reflection Probe at a position
- `light_get_lightmap_settings` - Inspect Lightmap baking settings
---
Light Types
| Type | Description | Use Case | |------|-------------|----------| | `Directional` | Parallel rays, no position | Sun, moon | | `Point` | Omnidirectional from a point | Torches, bulbs | | `Spot` | Cone-shaped beam | Flashlights, spotlights | | `Area` | Rectangle/disc (baked only) | Windows, soft lights |
---
Skills
light_create
Create a new light.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `name` | string | No | "New Light" | Light name | | `lightType` | string | No | "Point" | Directional/Point/Spot/Area | | `x`, `y`, `z` | float | No | 0,3,0 | Position | | `r`, `g`, `b` | float | No | 1,1,1 | Color (0-1) | | `intensity` | float | No | 1 | Light intensity | | `range` | float | No | 10 | Range (Point/Spot) | | `spotAngle` | float | No | 30 | Cone angle (Spot only) | | `shadows` | string | No | "soft" | none/hard/soft |
**Returns**: `{success, name, instanceId, lightType, position, color, intensity, shadows}`
light_set_properties
Configure light properties.
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `name` | string | No* | Light object name | | `instanceId` | int | No* | Instance ID (preferred) | | `r`, `g`, `b` | float | No | Color (0-1) | | `intensity` | float | No | Light intensity | | `range` | float | No | Range (Point/Spot) | | `spotAngle` | float | No | Cone angle (Spot only) | | `shadows` | string | No | none/hard/soft |
**Returns**: `{success, name, lightType, color, intensity, range, spotAngle, shadows}`
light_set_properties_batch
Configure multiple lights. Each item accepts: `name`/`instanceId`/`path` (identifier) + `r`, `g`, `b`, `intensity`, `range`, `shadows` (all optional). | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `items` | json string | Yes | - | JSON array of per-item objects (see example below) |
**Returns**: `{success, totalItems, successCount, failCount, results: [{success, name}]}`
unity_skills.call_skill("light_set_properties_batch", items=[
{"name": "Light1", "intensity": 2.0, "r": 1, "g": 0.9, "b": 0.8},
{"instanceId": 12345, "intensity": 1.5, "shadows": "soft"},
{"name": "Light3", "intensity": 2.0}
])light_set_enabled
Enable or disable a light.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `name` | string | No* | - | Light object name | | `instanceId` | int | No* | - | Instance ID | | `path` | string | No* | - | Hierarchy path | | `enabled` | bool | No | `true` | Enable state |
**Returns**: `{success, name, enabled}`
light_set_enabled_batch
Enable or disable multiple lights. | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `items` | json string | Yes | - | JSON array of per-item objects (see example below) |
**Returns**: `{success, totalItems, successCount, failCount, results: [{success, name, enabled}]}`
unity_skills.call_skill("light_set_enabled_batch", items=[
{"name": "Torch1", "enabled": False},
{"name": "Torch2", "enabled": False},
{"name": "Torch3", "enabled": False}
])light_get_info
Get detailed light information.
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `name` | string | No* | Ligh
REST API-based AI-driven Unity Editor Automation Engine Let AI control Unity scenes directly through Skills 🎉 We are now indexed by DeepWiki! Got questions? Check out the AI-generated docs → The current official maintenance baseline is Unity 2022.3+.
Other skills on unity-skills.
- /addressables-design
Source-anchored design rules for Unity Addressables 1.22.3/2.9.1. 为 Unity Addressables 1.22.3/2.9.1 提供源码锚定的设计规则。
Open skill - /adr
Record Unity architecture decisions (ADR) with rationale. 记录 Unity 架构决策(ADR)与理由。
Open skill - /animator
Edit Unity Animator Controllers and drive runtime parameters. 编辑 Unity Animator Controller 并驱动运行时参数。
Open skill - /architecture
Advise on Unity gameplay and system architecture. 为 Unity 游戏与系统架构提供建议。
Open skill - /asmdef
Advise on Unity assembly definitions (asmdef). 为 Unity 程序集定义(asmdef)提供建议。
Open skill - /asset
Manage Unity AssetDatabase operations. 管理 Unity AssetDatabase 操作。
Open skill

