I’m trying to make button that activates and deactivates light.
I have tried following script but it doesn’t seem to work.
using UnityEngine;
using System.Collections;
public class ToggleLightButton : MonoBehaviour
{
public Light Light;
void OnMouseDown ()
{
Light.enabled = true;
}
}