public float intensity ;

Descripción

The Intensity of a light is multiplied with the Light color.

The value can be between 0 and 8. This allows you to create over bright lights.

using UnityEngine;

public class Example : MonoBehaviour { // Interpolate light color between two colors back and forth float duration = 1.0f; Color color0 = Color.red; Color color1 = Color.blue;

Light lt;

void Start() { lt = GetComponent<Light>(); }

void Update() { // set light color float t = Mathf.PingPong(Time.time, duration) / duration; lt.color = Color.Lerp(color0, color1, t); } }