Skip to content

LightTool

Extends: Tool < Object

Description

The tool used to edit lights.

Accessed by Global.Editor.Tools["LightTool"].

Properties

Range Range
float Intensity
Color Color
bool Shadows
bool Widgets
Texture texture
Light2D preview

Methods

void CreatePreview ( )
void ChangeColor ( Color color, String name )
void SetShadows ( bool shadows )

Property Descriptions

  • Range Range:
    Gets and sets the range of the lights placed.

  • float Intensity:
    Gets and sets the intensity of the lights placed.

  • Color Color:
    Gets and sets whether the tool will place lights that cast LOS shadows. Will not update active light. Set with ChangeColor() instead if you need to update active light.

  • bool Shadows:
    Gets and sets whether the tool will place lights that cast LOS shadows. Will not update active light. Set with SetShadows() instead if you need to update active light.

  • bool Widgets:
    Gets and sets whether the tool will display a widget over the light.

  • Texture texture:
    Light2D of the asset selected. Used automatically by the UI controls. Does not update the preview link:Light2D automatically.

  • Light2D preview:
    Gets the preview Light before it is placed. DO NOT MODIFY.

Method Descriptions

  • void CreatePreview ( ):
    Create a new light as a preview and store it in the preview property.

  • void ChangeColor ( Color color, String name ):
    Sets the color of the light and subsequent light placements. The param name is not used.

  • void SetShadows ( bool shadows ):
    Sets whether the tool will place lights that cast LOS shadows.