- Home /
Question by
Zac_Mountain · Sep 19, 2016 at 05:58 AM ·
errorlightingerror messageerror-message
error CS0246: Light Color not working
I have a script, that is attached to a spot light, so when it sees a vairable has changed, it will change the color of the light, i think its a bit of a noob way of going about it but its the only way I know to change the light color from another script. using UnityEngine; using System.Collections;
public class oTurnOn : MonoBehaviour {
public string whoIsWinner;
// Use this for initialization
void Start () {
GetComponent<light> ().color = Color.black;
}
// Update is called once per frame
void Update () {
whoIsWinner = motherShip.whoWon;
if (motherShip.whoWon == "X")
print ("Yes");
}
}
Assets/oTurnOn.cs(10,30): error CS0246: The type or namespace name `light' could not be found. Are you missing a using directive or an assembly reference?
any help?
Thanks!
Comment