示例#1
0
    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);
        }
    }
示例#2
0
 void ToggleLight()
 {
     GetComponentInChildren <Light>().enabled = IsOn;
     EmissionObj.GetComponent <Renderer>().material.SetColor("_EmissionColor", IsOn ? EmissionColor : Color.black);
     UpdateProbe.OnOnLightChanged();
 }