コード例 #1
0
 public void CloseUITip(TipConType tipContentType, int CacheCount = -1, bool destoryCache = false, bool recycleParent = true)
 {
     if (TypeToTipPanel.ContainsKey(tipContentType))
     {
         resLoader.ReleaseObj(TypeToTipPanel[tipContentType].gameObject, CacheCount, destoryCache, recycleParent);
         TypeToTipPanel.Remove(tipContentType);
     }
 }
コード例 #2
0
 public void ReleaseObjPrefab()
 {
     if (Obj.Count > 0)
     {
         AFLogger.d("释放从AB包加载的资源");
         //满足释放的条件 : 1.maxCacheCount为0 2.destoryObj为true 3.引用计数为0
         resLoader.ReleaseObj(Obj[Obj.Count - 1], 0, true);
         Obj.RemoveAt(Obj.Count - 1);
     }
     else
     {
         AFLogger.d("请先加载资源再释放");
     }
 }
コード例 #3
0
ファイル: UIManager.cs プロジェクト: webloverand/AFramework
 protected void CloseUI(string scriptName, UIPanelParent panel, int CacheCount = -1,
                        bool destoryCache = false, bool recycleParent = true)
 {
     //面板销毁 : 因此首先销毁其父物体与子物体
     if (CacheCount == 0)
     {
         panel.RecycleParAndChild();
     }
     resLoader.ReleaseObj(ScriptsNameToPanel[scriptName].gameObject, CacheCount, destoryCache, recycleParent);
     RemoveParentPanel(scriptName);
     UITagToScriptsName.Remove(GetUITagByScriptName(scriptName));
     if (ScriptsNameToPanel.ContainsKey(scriptName))
     {
         ScriptsNameToPanel.Remove(scriptName);
     }
 }