Unity and Light with C# ... [HELP][Solved !]
I tryed the same code (After I converted it to Java) to Java Code and it worked normally ... but after I used C# to do the same work it didn't worked

I used this code for Java :
Code:
function Update () {
if(Input.GetKeyDown(KeyCode.F)){
if(light.enabled == true)
light.enabled = false;
else
light.enabled = true;
}
}
And this for C# which didn't worked :
Code:
void Update () {
if(Input.GetKey(KeyCode.F)){
if(light.enabled = true){
light.enabled = false;
}
else{
Light.enabled = true;
}
}
}
If you can help guys help ... Ah ... also I am a new member and I welcome myself to this beautiful forum

-------------
This Topic Has Been Solved ... thank you guys for help