โ† Game Development with Unity learning path
Game Development with Unity ยท Module 3 of 10

C# scripting basics

Control game behaviour with scripts.

๐Ÿ“– Key ideas

  1. Scripts inherit from MonoBehaviour.
  2. Start() runs once; Update() runs every frame.
  3. Public/[SerializeField] fields appear in the Inspector.
  4. Use Time.deltaTime for frame-rate independent movement.
  5. Debug.Log prints to the Console.
๐Ÿ’ก Real-life example: Update() is a heartbeat: every frame the script checks and moves things.
MonoBehaviourBase class for Unity scripts
Start()Runs once at beginning
Update()Runs every frame
Time.deltaTimeTime since last frame