Skip to content

Lighting

Lighting, a static global class, is the in-game light of the map. It allows you to modify the lighting of the instance in the same way that the in-game lighting menu does. You call these functions like this: Lighting.apply().

For more information on lighting in Unity, refer to the Unity documentation.

Example

Make the lighting bright red.

Lighting.light_intensity = 2
Lighting.setLightColor({r = 1, g = 0.6, b = 0.6})
Lighting.apply()

Member Variables

Variable Type Description
ambient_intensity The strength of the ambient light. Range = 0 to 4.
ambient_type The source of ambient light. 1 = background, 2 = gradient.
light_intensity The strength of the directional light shining down in the scene. Range = 0 to 4.
lut_contribution How much the LUT contributes to the light.
lut_index The LUT index of the light.
lut_url The URL of the LUT.
reflection_intensity The strength of the reflections from the background. Range = 0 to 1.

Function Summary

Functions

Function Name Return Description
apply()
apply()
Applies pending changes made via the Lighting class.
getAmbientEquatorColor()
getAmbientEquatorColor()
Returns Color Table of the gradient equator. Not used if ambient_type = 1.
getAmbientGroundColor()
getAmbientGroundColor()
Returns Color Table of the gradient ground. Not used if ambient_type = 1.
getAmbientSkyColor()
getAmbientSkyColor()
Returns Color Table of the gradient sky. Not used if ambient_type = 1.
getLightColor()
getLightColor()
Returns Color Table of the directional light, which shines straight down on the table.
setAmbientEquatorColor(
setAmbientEquatorColor(...)
tint)
Sets the color of the gradient equator. Not used if ambient_type = 1.
setAmbientGroundColor(
setAmbientGroundColor(...)
tint)
Sets the color of the gradient ground. Not used if ambient_type = 1.
setAmbientSkyColor(
setAmbientSkyColor(...)
tint)
Sets the color of the gradient sky. Not used if ambient_type = 1.
setLightColor(
setLightColor(...)
tint)
Sets the color of the directional light, which shines straight down on the table.