Update and FixedUpdate
Tutorial
·
Beginner
·
+10XP
·
5 mins
·
(3835)
Unity Technologies

How to effect changes every frame with the Update and FixedUpdate functions, and their differences.
This tutorial is included in the Beginner Scripting project.
Previous: Awake and Start
Next: Vector Maths
Languages available:
1. Update and FixedUpdate
using UnityEngine;
using System.Collections;
public class UpdateAndFixedUpdate : MonoBehaviour
{
void FixedUpdate ()
{
Debug.Log("FixedUpdate time :" + Time.deltaTime);
}
void Update ()
{
Debug.Log("Update time :" + Time.deltaTime);
}
}