- 13/03/2016 19:37
Alguien me puede decir si falla algo en este script que estoy haciendo tal como pone en un tutorial para encender luces y apagarlas dentro de Unity?
Está adjunto:
[CODE]#pragma strict.
Var myLight : Light;.
Var myLight1 : Light;.
Function Start(){.
MyLight = Light. FindObjectOfType(typeof(Light));.
}.
Function Update () {.
If(Input. GetButtonDown(Fire1)){.
MyLight, enabled =.myLight, enabled;.
MyLight1.enabled =.myLight, enabled;.
}.
}[/CODE].
Ese seria él código, pero solo hace fallar y no entiendo el motivo.
-- IMÁGENES ADJUNTAS --
Está adjunto:
[CODE]#pragma strict.
Var myLight : Light;.
Var myLight1 : Light;.
Function Start(){.
MyLight = Light. FindObjectOfType(typeof(Light));.
}.
Function Update () {.
If(Input. GetButtonDown(Fire1)){.
MyLight, enabled =.myLight, enabled;.
MyLight1.enabled =.myLight, enabled;.
}.
}[/CODE].
Ese seria él código, pero solo hace fallar y no entiendo el motivo.
-- IMÁGENES ADJUNTAS --