Does anyone know how unity run the script. At first I think that unity read through the script time after time like a loop but when I wrote this
using UnityEngine;
using System.Collections;
public class LightScript: MonoBehaviour {
Light Ist;
void Yahoo(){
int z=5;
Debug.Log ("Num "+z);
z += 5;
}
void Start () {
Ist = GetComponent<Light>();
}
void Update () {
Ist.enabled = false;
}
}
I think it should update the
over time but it doesn’t. Anyone knows the answer plss help. Thanks in advance