add_light
Spawn Directional, Point, Spot, Rect, or Sky light actors in the Unreal Editor world (not PIE) at a chosen location and rotation, with optional intensity and color.
Instructions
Spawn a Directional, Point, Spot, Rect or Sky light actor in the editor world (not PIE) at location and rotation, optionally setting intensity and color, outside any undo transaction; nothing is saved. Returns light_type and the internal actor_name of the new actor.
Returns: { light_type: string, actor_name: string }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | No | [r, g, b] linear color, usually 0..1; default white. Any other form (an object, a hex string, fewer than 3 numbers) sets black. | |
| location | No | [x, y, z] world location in cm; default [0, 0, 0], also when the array has fewer than 3 numbers. | |
| rotation | No | PREFERRED: the OBJECT {"roll":R,"pitch":P,"yaw":Y} (any subset, absent axes are 0). The ARRAY form below is [pitch, yaw, roll] -- its index 2 is ROLL, NOT yaw, which once put a PlayerStart on its side. World rotation in degrees as [pitch, yaw, roll], default [0, 0, 0]; directional, spot and rect lights shine along its forward axis. | |
| intensity | No | Value for the Intensity property in the units of the light (Directional: lux; Sky: a multiplier); engine default when omitted. | |
| light_type | Yes | Directional, Point, Spot, Rect, or Sky (case-insensitive); anything else is an error. |