using LitJson; using UnityEngine; using UnityEngine.EventSystems; using System; using System.Xml; using System.Collections; using System.Collections.Generic; public class Initializer : MonoBehaviour { #region public static List RegistList; #endregion private void Awake() { RegistList = new List(); if (Bundle.Instance == null) { gameObject.AddScript(); } if (Auxiliary.Instance == null) { gameObject.AddScript(); } gameObject.AddScript(); gameObject.AddScript(); gameObject.AddScript(); gameObject.AddScript(); gameObject.AddScript(); gameObject.AddScript(); gameObject.AddScript(); gameObject.AddScript(); gameObject.AddScript(); StartCoroutine(IInitialize()); } public static void Initialize() { for (int i = 0; i < RegistList.Count; i++) { RegistList[i].Instantiate(); RegistList[i].enabled = true; } for (int i = 0; i < RegistList.Count; i++) { RegistList[i].RegistReference(); } for (int i = 0; i < RegistList.Count; i++) { RegistList[i].RegistValueA(); } for (int i = 0; i < RegistList.Count; i++) { RegistList[i].RegistValueB(); } for (int i = 0; i < RegistList.Count; i++) { RegistList[i].RegistValueC(); } //Bundle.UI.Unload(true); //Bundle.Skill.Unload(true); //Bundle.Config.Unload(true); //Bundle.Object.Unload(true); //Bundle.Shader.Unload(true); //Bundle.Garden.Unload(true); //Bundle.Character.Unload(true); } public IEnumerator IInitialize() { while (Bundle.LoadComplete == false) { yield return null; } Initialize(); } }