Removed

Component.light

Obsolete Property light has been deprecated. Use GetComponent<Light>() instead. public Component light;

Description

The Light attached to this GameObject. (Null if there is none attached).

using UnityEngine;

public class Example : MonoBehaviour { void Start() { GetComponent<Light>().range = 10; } }

Did you find this page useful? Please give it a rating: