private void ToggleLights(bool on) { foreach (GameObject g in Lights) { g.SetActive(on); } if (!IsWebGl) { UpdateProbe.OnOnLightChanged(); } else { RelfectionProbes[0].SetActive(on); RelfectionProbes[1].SetActive(!on); } }
void ToggleLight() { GetComponentInChildren <Light>().enabled = IsOn; EmissionObj.GetComponent <Renderer>().material.SetColor("_EmissionColor", IsOn ? EmissionColor : Color.black); UpdateProbe.OnOnLightChanged(); }