using System.Collections; using System.Collections.Generic; using UnityEngine; public class InitializeController : MonoBehaviour { [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] public static void Init() { GameObject main = GameObject.Instantiate(Resources.Load("Initialize")) as GameObject; GameObject.DontDestroyOnLoad(main); Debug.Log("Initialize "); } }