/// <summary> /// 实例化。开始切换时调用。不会重复加载 /// </summary> /// <returns></returns> public static EntranceUI Load(bool useAnimation = true) { if (Instance) { return(Instance); //不重复加载 } if (!Prefab) { return(null); } var ui = MainRoot.LoadUI(Prefab, useAnimation); Instance = ui.GetComponent <EntranceUI>(); Instance.ResetUIRange(); Instance.Initialize(); if (useAnimation) { Instance.DelayEnterStageCoroutine(); } return(Instance); }