Loading...
Loading...
Unity lighting control. Use when users want to create or configure lights (Directional, Point, Spot, Area). Triggers: light, lighting, directional light, point light, spot light, shadows, intensity, 灯光, 光照, 阴影.
npx skill4agent add besty0728/unity-skills unity-lightBATCH-FIRST: Useskills when operating on 2+ lights.*_batch
light_addlight_createlight_set_colorlight_set_intensitylight_set_propertieslight_deletegameobject_deletelight_set_shadowlight_set_propertiesshadowslight_get_lightmap_settingslight_add_reflection_probelight_add_probe_groupObject Targeting: All single-object skills accept(string) andname(int, preferred). Provide at least one.instanceId(hierarchy path) is also accepted where noted.path
| Single Object | Batch Version | Use Batch When |
|---|---|---|
| | Configuring 2+ lights |
| | Toggling 2+ lights |
light_createlight_get_infolight_find_all| Type | Description | Use Case |
|---|---|---|
| Parallel rays, no position | Sun, moon |
| Omnidirectional from a point | Torches, bulbs |
| Cone-shaped beam | Flashlights, spotlights |
| Rectangle/disc (baked only) | Windows, soft lights |
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| string | No | "New Light" | Light name |
| string | No | "Point" | Directional/Point/Spot/Area |
| float | No | 0,3,0 | Position |
| float | No | 1,1,1 | Color (0-1) |
| float | No | 1 | Light intensity |
| float | No | 10 | Range (Point/Spot) |
| float | No | 30 | Cone angle (Spot only) |
| string | No | "soft" | none/hard/soft |
{success, name, instanceId, lightType, position, color, intensity, shadows}| Parameter | Type | Required | Description |
|---|---|---|---|
| string | No* | Light object name |
| int | No* | Instance ID (preferred) |
| float | No | Color (0-1) |
| float | No | Light intensity |
| float | No | Range (Point/Spot) |
| string | No | none/hard/soft |
nameinstanceIdpathrgbintensityrangeshadows{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}
])| Parameter | Type | Required | Description |
|---|---|---|---|
| string | No* | Light object name |
| int | No* | Instance ID |
| bool | Yes | Enable state |
{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}
])| Parameter | Type | Required | Description |
|---|---|---|---|
| string | No* | Light object name |
| int | No* | Instance ID |
{name, instanceId, path, lightType, color, intensity, range, spotAngle, shadows, enabled}| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| string | No | null | Filter by type |
| int | No | 50 | Max results |
{count, lights: [{name, instanceId, path, lightType, intensity, enabled}]}light_add_probe_group| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| string | No | null | GameObject name |
| int | No | 0 | Instance ID |
| string | No | null | Hierarchy path |
| int | No | 0 | Probe count on X axis |
| int | No | 0 | Probe count on Y axis |
| int | No | 0 | Probe count on Z axis |
| float | No | 2 | Meters between probes on X |
| float | No | 1.5 | Meters between probes on Y |
| float | No | 2 | Meters between probes on Z |
{ success, gameObject, probeCount, existed, hasGrid }light_add_reflection_probe| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| string | No | "ReflectionProbe" | Probe name |
| float | No | 0,1,0 | Position |
| float | No | 10,10,10 | Probe box size |
| int | No | 256 | Cubemap resolution |
{ success, name, instanceId, resolution, size }light_get_lightmap_settings{ success, bakedGI, realtimeGI, lightmapSize, lightmapPadding, isRunning, lightmapCount }import unity_skills
# BAD: 4 API calls
unity_skills.call_skill("light_set_properties", name="Light1", intensity=2.0)
unity_skills.call_skill("light_set_properties", name="Light2", intensity=2.0)
unity_skills.call_skill("light_set_properties", name="Light3", intensity=2.0)
unity_skills.call_skill("light_set_properties", name="Light4", intensity=2.0)
# GOOD: 1 API call
unity_skills.call_skill("light_set_properties_batch", items=[
{"name": "Light1", "intensity": 2.0},
{"name": "Light2", "intensity": 2.0},
{"name": "Light3", "intensity": 2.0},
{"name": "Light4", "intensity": 2.0}
])unity_skills.call_skill("light_create",
name="Sun", lightType="Directional",
r=1, g=0.95, b=0.85, intensity=1.2, shadows="soft"
)GET /skills/schemaunity_skills.get_skill_schema()