示例#1
0
        private void ABStart(APPVersionStatus versionStatus)
        {
            resLoader = ResLoader.Allocate();
            if (versionStatus != APPVersionStatus.Abandon)
            {
                //这里为了保证PersistentDataPathAB时云端资源下载完成
                switch (ABDataHolder.Instance.GetABResLoadFrom())
                {
                case ABResLoadFrom.EditorRes:
                    isABFinish    = true;
                    ABStatus.text = "AB包准备完成";
                    break;

                case ABResLoadFrom.PersistentDataPathAB:
                    ABHotUpdate.Instance.ABMD5Request("Main", ABProcessevent, ABMD5Callback);
                    break;

                case ABResLoadFrom.StreamingAssetAB:
                    isABFinish    = true;
                    ABStatus.text = "AB包准备完成";
                    break;
                }
            }
            else
            {
                AFLogger.d("版本检测显示是废弃APP,请检查设置");
            }
        }
示例#2
0
 protected ResLoader GetResLoader()
 {
     if (resLoader == null)
     {
         resLoader = ResLoader.Allocate();
     }
     return(resLoader);
 }
示例#3
0
        protected T CreateTipPanel <T>(int uitag, Transform parentTrans, UIDataParent UIDataParent = null,
                                       bool isClear = false)
            where T : UIPanelParent
        {
            AFUIAttribute uiAttri = UIManager.Instance.GetClassData(uitag).Attribute as AFUIAttribute;

            if (resLoader == null)
            {
                resLoader = ResLoader.Allocate();
            }

            GameObject panel   = resLoader.InstantiateObjectSync(UIManager.Instance.GetResFrom(uiAttri.UIPath), uiAttri.UIPath, parentTrans, isClear);
            T          scripts = panel.GetComponent <T>();

            if (scripts == null)
            {
                scripts = panel.AddComponent <T>();
            }
            scripts.Open(uitag, uiAttri.UIPath, UIDataParent, UIManager.Instance.GetResFrom(uiAttri.UIPath), null);
            return(scripts);
        }