コード例 #1
0
        /// <summary>
        /// 卸载某个指定的UIFrm
        /// </summary>
        /// <param name="userInterface"></param>
        public void ReleaseUIFrm(string uiName)
        {
            string         resName       = uiName + ".prefab";
            IUserInterface userInterface = null;

            if (DicAllUIFrm.ContainsKey(resName))
            {
                userInterface = DicAllUIFrm[resName];
            }
            if (userInterface == null)
            {
                Debug.LogWarning($"这个资源未加载进缓存中,不需要释放{resName}");
                return;
            }
            userInterface.Release();
            //Debug.Log("AllUIFrm Count = " + DicAllUIFrm.Count);
            //Debug.Log("DicShowUIFrm Count = " + DicAllUIFrm.Count);
            //Debug.Log("Stack Count = " + StackUIFrm.Count);
            //Debug.Log("HideList Count = " + LstHideUIFrm.Count);
        }
コード例 #2
0
 /// <summary>
 /// 卸载某个指定的UIFrm
 /// </summary>
 /// <param name="uiFrm">对应的UI窗体对象</param>
 private void ReleaseUIFrm(IUserInterface uiFrm)
 {
     uiFrm.Release();
 }