how to use update as a function unity code example Example: void Update void Update() { //checked every frame }