Version: 2017.2
public float range ;

Descripción

El rango de la luz.

See Also: Light component.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public float duration = 3.0F; public float originalRange; public Light lt; void Start() { lt = GetComponent<Light>(); originalRange = lt.range; } void Update() { float amplitude = Mathf.PingPong(Time.time, duration); amplitude = amplitude / duration * 0.5F + 0.5F; lt.range = originalRange * amplitude; } }