예제 #1
0
 public override void Load(LoaderManager _loader)
 {
     mPathName = _loader.GetFullPath(mAssetName);
     mCreat    = AssetBundle.LoadFromFileAsync(mPathName);
     mStep     = StepState.BundleLoad;
     base.Load(_loader);
 }
예제 #2
0
        public override void Load()
        {
            base.Load();
            mPathName = LoaderManager.GetFullPath(mAssetName);

            mAssetsBundle = AssetBundle.LoadFromFile(mPathName);
            if (mAssetsBundle != null)
            {
                if (((AssetBundle)mAssetsBundle).isStreamedSceneAssetBundle)
                {
                    mAsset = ((AssetBundle)mAssetsBundle).LoadAllAssets();
                }
                else
                {
                    mAsset = ((AssetBundle)mAssetsBundle).LoadAsset(mAssetName);
                }

                OptAssetShow();
            }
            else
            {
                UnityEngine.Debug.LogError("AssetsBundleFromFile打开文件失败,请检查资源是否存在-" + mPathName);
            }
            LoadEnd();
        }
예제 #3
0
            public override void Load(LoaderManager _loader)
            {
                mPathName = _loader.GetFullPath(mAssetName);

                mAssetsBundle = AssetBundle.LoadFromFile(mPathName);
                if (mAssetsBundle != null)
                {
                    if (((AssetBundle)mAssetsBundle).isStreamedSceneAssetBundle)
                    {
                        mAsset = ((AssetBundle)mAssetsBundle).mainAsset;
                    }
                    else
                    {
                        mAsset = ((AssetBundle)mAssetsBundle).LoadAsset(DeleteSuffixName(mAssetName).ToLower());
                    }
                }
                else
                {
                    DLog.LogError("AssetsBundleFromFile打开文件失败,请检查资源是否存在-" + mPathName);
                }
                LoadEnd();
            }
예제 #4
0
 public override void Load()
 {
     mPathName = LoaderManager.GetFullPath(mAssetName);
     mCreat    = AssetBundle.LoadFromFileAsync(mPathName);
     base.Load();
 }