using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LifeCycle : MonoBehaviour
{
void Awake()
{
Debug.Log("Awake 함수 실행");
}
void Start()
{
Debug.Log("Start 함수 실행");
}
}
👇 실행결과
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LifeCycle : MonoBehaviour
{
void OnEnable()
{
Debug.Log("OnEnable 함수 실행");
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LifeCycle : MonoBehaviour
{
void FixedUpdate()
{
Debug.Log("FixedUpdate 함수 실행");
}
}
👇 실행결과
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LifeCycle : MonoBehaviour
{
void Update()
{
Debug.Log("Update 함수 실행");
}
void LateUpdate()
{
Debug.Log("LateUpdate 함수 실행");
}
}
👇 실행결과
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LifeCycle : MonoBehaviour
{
void OnDisable()
{
Debug.Log("OnDisable 함수 실행");
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LifeCycle : MonoBehaviour
{
void OnDestroy()
{
Debug.Log("OnDestroy 함수 실행");
}
} // 하이어라키창에서 오브젝트를 삭제될 경우 로그 내용 실행