Lightclass

object→Component→Light
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public abstract class Sandbox.Light : Sandbox.Component

Constructors1

Showing 1 constructors

protected Light()PROTECTEDCONSTRUCTOR

Methods5

Showing 5 methods

protected virtual void OnAwake()PROTECTEDVIRTUALLIFECYCLE

Returns:void—

protected virtual void OnDisabled()PROTECTEDVIRTUALLIFECYCLE

Returns:void—

protected virtual void OnEnabled()PROTECTEDVIRTUALLIFECYCLE

Returns:void—

protected virtual void OnTagsChanged()PROTECTEDVIRTUAL

Tags have been updated - lets update our light's tags

Returns:void—

Properties9

Showing 9 properties

public int Sandbox.Light.BakeLightIndex { get; set; }PUBLICGETSET

Index used by baked probe/lightmap direct-light textures, or -1 for a dynamic light.

Returns:int—

public Sandbox.Light.LightContribution Sandbox.Light.Contribution { get; set; }PUBLICGETSET

Which lighting terms this light is allowed to contribute to. For example, turn off `Sandbox.Light.LightContribution.Specular` to stop a light producing highlights.

public float Sandbox.Light.FogStrength { get; set; }PUBLICGETSET

Returns:float—

public Color Sandbox.Light.LightColor { get; set; }PUBLICGETSET

The main color of the light

Returns:Color—

public bool Sandbox.Light.MixedShadows { get; set; }PUBLICGETSET

Baked lighting with realtime shadows from dynamic objects, like Hammer's stationary lights. Requires a baked light index and enabled shadows.

Returns:bool—

public float Sandbox.Light.ShadowBias { get; set; }PUBLICGETSET

Returns:float—

public float Sandbox.Light.ShadowHardness { get; set; }PUBLICGETSET

Returns:float—

public bool Sandbox.Light.Shadows { get; set; }PUBLICGETSET

Should this light cast shadows?

Returns:bool—

On this page