/* ---------------------------------------- * At Awake, assign the 'OnDemandProbe' game object to * 'probe', and the 'UpdateProbe' to the 'up' variable */ void Awake() { // Asign the 'OnDemandProbe' game object to the 'probe' variable probe = GameObject.Find("OnDemandProbe"); // Assign the 'UpdateProbe' component of the 'probe' object to the 'up' variable up = probe.GetComponent<UpdateProbe>(); }
/* ---------------------------------------- * At Awake, assign the 'OnDemandProbe' game object to * 'probe', and the 'UpdateProbe' to the 'up' variable */ void Awake() { // Asign the 'OnDemandProbe' game object to the 'probe' variable probe = GameObject.Find("OnDemandProbe"); // Assign the 'UpdateProbe' component of the 'probe' object to the 'up' variable up = probe.GetComponent <UpdateProbe>(); }
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 Awake() { probe = GameObject.Find("OnDemandProbe"); up = probe.GetComponent <UpdateProbe>(); }
void ToggleLight() { GetComponentInChildren <Light>().enabled = IsOn; EmissionObj.GetComponent <Renderer>().material.SetColor("_EmissionColor", IsOn ? EmissionColor : Color.black); UpdateProbe.OnOnLightChanged(); }