C# For And While Loops in Unity

Опубликовано: 14 Ноябрь 2024
на канале: XR Terra Class
50
0

This video explains how to declare for loops and while loops in your C# scripts within Unity. We cover some rounding errors that can occur when using floats, and explain the importance of making sure while loop conditions are met. In future modules we'll explain how to combine loops with coroutines to execute code over time.

XRTerra Links:
Programs and Courses: http://www.xrterra.com/programs
Newsletter Signup: https://www.xrterra.com/mailing-list-...

00:00 Intro
00:26 Explaining For Loops
02:21 Creating a for loop
04:53 Demoing for loop
05:45 Float rounding errors
08:09 Converting from float to decimal
09:48 Explaining While Loops
10:57 Creating a while loop
13:44 While Loops vs For Loops

Instructor: Gregory Osborne