public override void OnInspectorGUI() { base.OnInspectorGUI(); Lights light = target as Lights; if (GUILayout.Button("Toggle")) { light.ToggleLight(); } if (GUILayout.Button("Flicker")) { light.FlickerLight(0.5f, 4); } }