// add the glow componet to a object and assigns it a random glow color and tells it not to glow private void AddGlows(GameObject obj) { GlowObject go = obj.AddComponent <GlowObject>(); go.glowColor = UnityEngine.Random.ColorHSV(0.2F, 1, 0.2F, 1, 0.2F, 1, 0, 0); go.Glow(false); }
public override void OnInspectorGUI() { GlowObject glowObj = (GlowObject)target; DrawDefaultInspector(); GUILayout.Space(10); if (GUILayout.Button("Start Glowing")) { glowObj.Glow(true); } GUILayout.Space(10); if (GUILayout.Button("Stop Glowing")) { glowObj.Glow(false); } }