Ejemplo n.º 1
0
 public override void Load(LoaderManager _loader)
 {
     mPathName = _loader.GetFullPath(mAssetName);
     mCreat    = AssetBundle.LoadFromFileAsync(mPathName);
     mStep     = StepState.BundleLoad;
     base.Load(_loader);
 }
Ejemplo n.º 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();
        }
Ejemplo n.º 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();
            }
Ejemplo n.º 4
0
 public override void Load()
 {
     mPathName = LoaderManager.GetFullPath(mAssetName);
     mCreat    = AssetBundle.LoadFromFileAsync(mPathName);
     base.Load();
 }