IEnumerator Show() { yield return(new WaitForSeconds(0.06f)); _instanceMat.SetFloat("_lightLevel", _lightDetector.GetLightLevel() / 255f); _pSystem.Play(); StartCoroutine(ReturnToPool()); }
void Update() { _material.SetFloat("_LightLevel", LightReceiver.GetLightLevel() / (float)255); }