본문 바로가기
개발/Unity

유니티 생명 주기 Life Cycle 간단 설명

by SPNK 2022. 8. 17.
반응형
using UnityEngine;


public class UnityLiftCycle : MonoBehaviour
{

    void Awake()
    {
        Debug.Log("1");
    }

    void OnEnable()
    {
        Debug.Log("2");
    }

    void Start()
    {
        Debug.Log("3");
    }

    void FixedUpdate() 
    {
        Debug.Log("4");
    }

    void OnTriggerEnter(Collider other) 
    {
        Debug.Log("5");
    }

    void OnCollisionEnter(Collision other)
    {
        Debug.Log("6");
    }

    void Update()
    {
        Debug.Log("7");
    }

    void LateUpdate() 
    {
        Debug.Log("8");
    }

    void OnDisable() 
    {
        Debug.Log("9");
    }

    void OnDestroy() 
    {
        Debug.Log("10");
    }

    void OnApplicationQuit() 
    {
        Debug.Log("11");
    }
}
반응형

댓글