コード例 #1
0
        protected override IEnumerator CoLoad(bool isSync, bool isAll, bool isPreLoad, Action <AssetLoadData> callback)
        {
            ABRequest.Load(this, isSync, AssetType);
            while (!ABRequest.IsComplete)
            {
                yield return(null);
            }

            OnCompleted(null, isPreLoad, callback);
        }
コード例 #2
0
ファイル: HRes.cs プロジェクト: qweewqpkn/MyStudy
        protected virtual IEnumerator CoLoad(bool isSync, bool isAll, bool isPreLoad, Action <AssetLoadData> callback)
        {
            ABDep = Get <HAssetBundle>(ABName, "", AssetType.eAB);

            //加载AB
            ABRequest.Load(ABDep, isSync, AssetType);
            while (!ABRequest.IsComplete)
            {
                yield return(null);
            }

            //加载Asset
            AssetRequest.Load(ABDep.AB, AssetName, isSync, isAll);
            while (!AssetRequest.IsComplete)
            {
                yield return(null);
            }

            //回调
            OnCompleted(AssetRequest, isPreLoad, callback);
        }