
⭐ Update():
☑️ This method is called continuously every frame ☑️ TheUpdate()
method is good for receiving inputs from the user continuously. Anything that needs to change or be adjusted regularly will be written inside theUpdate()
method for example⏱️ Timers. ☑️ Also used for non-physics based movement for example non-physics based character controller in 2D games ☑️ Update() depends on the game's refresh rate and the intervals are NOT regular. So if one frame takes longer to process, then the next Update() call is delayed.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CubeController : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
Debug.Log("Hello");
}
// Update is called once per frame
void Update()
{
Debug.Log("Updating");
///move cube 1 unit to the left per second
this.transform.position = this.transform.position + new Vector3(-1f, 0f, 0f) * Time.deltaTime;
}
}
Note: The transform property stores the position, rotation and scale of a game object to which a script is attached in the form of a Vector3 structure. It allows us to access the various properties and methods of the Transform class.
Vector3: Vector3 has a 3D direction, like a x, y and z point in a 3D space
Time.deltaTime allows you to move the object a n units per second rather than per frame (i.e. it slows it down – try the code without it and see
Full list here: https://docs.unity3d.com/ScriptReference/MonoBehaviour.html