Update() is called every frame, if the UnityEngine.MonoBehaviour is enabled.
void Update();
Update() is the most commonly used function to implement any kind of game script. Not every UnityEngine.MonoBehaviour script needs Update(). In order to get the elapsed time since last call to Update(), use UnityEngine.Time.deltaTime. This function is only called if the UnityEngine.Behaviour is enabled. Override this function in order to provide your UnityEngine.Component's functionality.