using System.Collections;
using UnityEngine;
public class Lanterna : MonoBehaviour {
void Update () {
if (Input.GetKeyDown ("f")) {
if (light.enabled == true){
Light.enabled = false;
}else if (light.enabled == false){
light.enabled = true;
}
}
}
}
And this error appears:
Assets/scripts/Lanterna.cs(9,11): error CS1061: Type `UnityEngine.Component' does not contain a definition for `enabled' and no extension method `enabled' of type `UnityEngine.Component' could be found. Are you missing an assembly reference?
Can someone help me? I would appreciate
↧