Assign to Empty GameObject that has a light on it
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
Show Code :
function Update() {
if (Input.GetKeyDown("f")) {
if (light.enabled == true)
light.enabled = false;
else
light.enabled = true;
}
}
if (Input.GetKeyDown("f")) {
if (light.enabled == true)
light.enabled = false;
else
light.enabled = true;
}
}