Invoke()void Start()
{
Debug.Log("InvokeStart");
Invoke("TestMethod". 3f);
}
void TestMethod()
{
Debug.Log("Test");
}
실행시 "InvokeStart" 로그 창에 추가, 3초 후 "Test"로그 표시
Coroutine 사용이 유리StartCoroutine(); //Starts a Coroutine.
StopAllCoroutines(); //Stops all coroutines running on this behaviour.
StopCoroutine(); //Stops the first coroutine named methodName, or the coroutine stored in routine running on this behaviour.
AwakeStart()보다 먼저 실행Awake() 실행 Start해당 오브젝트의 첫번째 프레임이 실행되기 전에 실행
런타임에 인스턴스화된 오브젝트에서는 실행되지 않음
두 함수가 언제 호출되고, 언제는 호출되지 않는지 확인하는 것이 중요