/// <summary>
        /// 针对ObjectManager异步加载的接口
        /// </summary>
        /// <param name="path"></param>
        /// <param name="resObj"></param>
        /// <param name="dealfinish"></param>
        /// <param name="priority"></param>
        public void AsyncLoadResouce(string path, TResouceObj resObj, OnAsyncFinish dealfinish, LoadResPriority priority)
        {
            TResouceItem item = GetCacheResouceItem(resObj.Crc);

            if (item != null)
            {
                resObj.ResItem = item;
                dealfinish?.Invoke(path, resObj);
            }
            //判断是否在加载中
            TAsyncLoadResParam para = null;

            if (!mLoadingAssetDic.TryGetValue(resObj.Crc, out para) || para == null)
            {
                para          = mAsyncLoadResParamPool.Allocate();
                para.Crc      = resObj.Crc;
                para.Path     = path;
                para.Priority = priority;
                mLoadingAssetDic.Add(resObj.Crc, para);
                mLoadingAssetList[(int)priority].Add(para);
            }
            //往回调列表里面加回调
            TAsyncCallBack callBack = mAsyncCallBackPool.Allocate();

            callBack.DealFinish = dealfinish;
            callBack.ResObj     = resObj;
            para.CallbackList.Add(callBack);
        }
        /// <summary>
        /// 取消异步加载资源
        /// </summary>
        /// <returns></returns>
        public bool CancleLoad(TResouceObj res)
        {
            TAsyncLoadResParam para = null;

            if (mLoadingAssetDic.TryGetValue(res.Crc, out para) && mLoadingAssetList[(int)para.Priority].Contains(para))
            {
                for (int i = para.CallbackList.Count; i > 0; i--)
                {
                    TAsyncCallBack tempCallBack = para.CallbackList[i];
                    if (tempCallBack != null && res == tempCallBack.ResObj)
                    {
                        tempCallBack.Reset();
                        mAsyncCallBackPool.Recycle(tempCallBack);
                        para.CallbackList.Remove(tempCallBack);
                    }
                }
                if (para.CallbackList.Count <= 0)
                {
                    para.Reset();
                    mLoadingAssetList[(int)para.Priority].Remove(para);
                    mAsyncLoadResParamPool.Recycle(para);
                    mLoadingAssetDic.Remove(res.Crc);
                    return(true);
                }
            }
            return(false);
        }
        /// <summary>
        /// 异步加载资源(仅仅是不需要实例化的资源,例如音频,图片等)
        /// </summary>
        /// <param name="path"></param>
        /// <param name="dealFinish"></param>
        /// <param name="priority"></param>
        /// <param name="param1"></param>
        /// <param name="param2"></param>
        /// <param name="param3"></param>
        /// <param name="crc"></param>
        public void AsyncLoadResouce(string path, OnAsyncObjFinish dealFinish, LoadResPriority priority, bool isSprite = false, object param1 = null, object param2 = null, object param3 = null, uint crc = 0)
        {
            if (crc == 0)
            {
                crc = CRC32.GetCRC32(path);
            }
            TResouceItem item = GetCacheResouceItem(crc);

            if (item != null)
            {
                if (dealFinish != null)
                {
                    dealFinish(path, item.Obj, param1, param2, param3);
                }
                return;
            }
            //判断是否在加载中
            TAsyncLoadResParam para = null;

            if (!mLoadingAssetDic.TryGetValue(crc, out para) || para == null)
            {
                para          = mAsyncLoadResParamPool.Allocate();
                para.Crc      = crc;
                para.Path     = path;
                para.IsSprite = isSprite;
                para.Priority = priority;
                mLoadingAssetDic.Add(crc, para);
                mLoadingAssetList[(int)priority].Add(para);
            }
            //往回调列表里面加回调
            TAsyncCallBack callBack = mAsyncCallBackPool.Allocate();

            callBack.DealObjFinish = dealFinish;

            callBack.Param1 = param1;
            callBack.Param2 = param2;
            callBack.Param3 = param3;
            para.CallbackList.Add(callBack);
        }
        /// <summary>
        /// 异步加载
        /// </summary>
        /// <returns></returns>
        IEnumerator AsyncLoadCor()
        {
            List <TAsyncCallBack> callBackList = null;
            //上一次yild的时间
            long lastYildTime = System.DateTime.Now.Ticks;

            while (true)
            {
                bool haveYield = false;
                for (int i = 0; i < (int)LoadResPriority.RES_NUM; i++)
                {
                    if (mLoadingAssetList[(int)LoadResPriority.RES_HIGHT].Count > 0)
                    {
                        i = (int)LoadResPriority.RES_HIGHT;
                    }
                    else if (mLoadingAssetList[(int)LoadResPriority.RES_MIDDLE].Count > 0)
                    {
                        i = (int)LoadResPriority.RES_MIDDLE;
                    }

                    List <TAsyncLoadResParam> loadingList = mLoadingAssetList[i];

                    if (loadingList.Count <= 0)
                    {
                        continue;
                    }
                    TAsyncLoadResParam loadingItem = loadingList[0];
                    loadingList.RemoveAt(0);
                    callBackList = loadingItem.CallbackList;

                    Object       obj  = null;
                    TResouceItem item = null;
#if UNITY_EDITOR
                    if (!AppConfig.UseAssetBundle)
                    {
                        if (loadingItem.IsSprite)
                        {
                            obj = LoadAssetByEditor <Sprite>(loadingItem.Path);
                        }
                        else
                        {
                            obj = LoadAssetByEditor <Object>(loadingItem.Path);
                        }

                        //模拟异步加载
                        yield return(new WaitForSeconds(0.5f));

                        item = AssetBundleManager.Instance.FindResouceItem(loadingItem.Crc);
                        if (item == null)
                        {
                            item     = new TResouceItem();
                            item.Crc = loadingItem.Crc;
                        }
                    }
#endif
                    if (obj == null)
                    {
                        item = AssetBundleManager.Instance.LoadResouceAssetBundle(loadingItem.Crc);
                        if (item != null && item.AssetBundle != null)
                        {
                            AssetBundleRequest abRequest = null;
                            if (loadingItem.IsSprite)
                            {
                                abRequest = item.AssetBundle.LoadAssetAsync <Sprite>(item.AssetName);
                            }
                            else
                            {
                                abRequest = item.AssetBundle.LoadAssetAsync(item.AssetName);
                            }
                            yield return(abRequest);

                            if (abRequest.isDone)
                            {
                                obj = abRequest.asset;
                            }
                            lastYildTime = System.DateTime.Now.Ticks;
                        }
                    }
                    CacheResouce(loadingItem.Path, ref item, loadingItem.Crc, obj, callBackList.Count);
                    for (int j = 0; j < callBackList.Count; j++)
                    {
                        TAsyncCallBack callBack = callBackList[j];
                        if (callBack != null && callBack.DealFinish != null && callBack.ResObj != null)
                        {
                            TResouceObj tempResObj = callBack.ResObj;
                            tempResObj.ResItem = item;
                            callBack.DealFinish(loadingItem.Path, tempResObj, tempResObj.Param1, tempResObj.Param2, tempResObj.Param3);
                            callBack.DealFinish = null;
                            tempResObj          = null;
                        }

                        if (callBack != null && callBack.DealObjFinish != null)
                        {
                            callBack.DealObjFinish(loadingItem.Path, obj, callBack.Param1, callBack.Param2, callBack.Param3);
                            callBack.DealObjFinish = null;
                        }
                        callBack.Reset();
                        mAsyncCallBackPool.Recycle(callBack);
                    }
                    obj = null;
                    callBackList.Clear();
                    mLoadingAssetDic.Remove(loadingItem.Crc);

                    loadingItem.Reset();
                    mAsyncLoadResParamPool.Recycle(loadingItem);

                    if (System.DateTime.Now.Ticks - lastYildTime > MAXLOADRESTIME)
                    {
                        yield return(null);

                        lastYildTime = System.DateTime.Now.Ticks;
                        haveYield    = true;
                    }
                }
                if (!haveYield || System.DateTime.Now.Ticks - lastYildTime > MAXLOADRESTIME)
                {
                    lastYildTime = System.DateTime.Now.Ticks;
                    yield return(null);
                }
                yield return(null);
            }
        }