using System.Collections; using System.Collections.Generic; using UnityEngine; public class LumLightTest : MonoBehaviour { public GameObject lightObj; private Color lightColor; // Use this for initialization void Start() { lightColor = new Color(0,0,0,0); } // Update is called once per frame void Update() { if (lightColor.r < 1) { print(lightColor.r); lightColor.r += Time.deltaTime; lightColor.g += Time.deltaTime / 2; lightObj.GetComponent().material.SetColor("_LuminousColor", lightColor); } } }