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