using UnityEngine; namespace UIWidgetsSample.RaycastableScene { public class LightController : MonoBehaviour { public Light light; static Light lightInstance; void OnEnable() { lightInstance = light; } public static void SwitchLight(bool state) { lightInstance.enabled = state; } public static void ChangeLightColor(float color) { lightInstance.color = Color.HSVToRGB(color, 0.3f, 0.9f); } } }