Unity/unity Study14 Unity : Scene 전환 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; using Newtonsoft.Json; public class App : MonoBehaviour { private void Awake() { UnityEngine.Object.DontDestroyOnLoad(this.gameObject); } void Start() { DataManager.GetInstance().Load(); SceneManager.LoadScene("Logo"); } .. 2020. 5. 11. Unity Lifecycle 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 using System.Collections; using System.Collections.Generic; using UnityEngine; public class App : MonoBehaviour { //인스턴스가 로딩될때 한번만 호출됨 // 단, 게임 오브젝트가 비활성화 상태일 경우 호출 안됨 //게임 오브젝트가 활성화 이고 컴포넌트가 비활성화 일 경우 호출됨 private void Awake() { Debug.Log("App : Aw.. 2020. 5. 11. 이전 1 2 3 4 다음