Unity 기본4 - 반복문 while, for문

특정 조건을 만족할때, 원하는 명령을 반복하도록 하는 명령 1. while 특정 조건을 만족하는 동안 반복문 실행 while (조건문) {조건문이 참일때 실행} if문 처럼 조건문이 참일 때 실행하는 문장이 1문장이면, {}는 생략 가능하나, 쓰는게 좋다 using System.Collections; using System.Collections.Generic; using UnityEngine; public class HelloWorld : MonoBehaviour { // Start is called before the first frame update void Start() { int i = 0; while (i < 10) { Debug.Log(i); i += 2; } } // Update is cal..