public override void Update() { if (isDone) { return; } var assetPath = AssetBundleUtility.PackagePathToAssetsPath(AssetName); if (this.isAsync) { //异步LoadAssetAsync if (assetbundleLoader.isDone) { if (assetBundleRequest == null) { assetBundleRequest = assetbundleLoader.assetbundle.LoadAssetAsync(assetPath, AssetType); } else { isOver = assetBundleRequest.isDone; if (isOver) { asset = assetBundleRequest.asset; assetbundleLoader.Dispose(); } } } } else { //同步LoadAsset isOver = assetbundleLoader.isDone; if (isOver) { asset = assetbundleLoader.assetbundle.LoadAsset(assetPath, AssetType); assetbundleLoader.Dispose(); } } }
public override void Update() { if (isDone) { return; } isOver = assetbundleLoader.isDone; if (!isOver) { return; } asset = AssetBundleManager.Instance.GetAssetCache(AssetName); assetbundleLoader.Dispose(); }
public override void Update() { if (isDone) { return; } if (assetbundleLoader == null) { Debug.LogError($"assetbundleLoader 无效 AssetName:({AssetName}) isOver:({isOver})"); } isOver = isOver || assetbundleLoader.isDone; if (!isOver) { return; } asset = AssetBundleManager.Instance.GetAssetCache(AssetName); assetbundleLoader.Dispose(); }
public override void Update() { if (isDone) { return; } isOver = assetbundleLoader.isDone; if (!isOver) { return; } asset = AssetBundleManager.Instance.GetAssetCache(AssetName); if (callBack != null) { // UnityEngine.Debug.LogError("ssss===callBack"); callBack(asset); } assetbundleLoader.Dispose(); }
public override void Update() { if (isDone) { return; } isOver = assetbundleLoader.isDone; if (!isOver) { return; } if (isAtlas) { this.assets = (UnityEngine.Object[])AssetBundleManager.Instance.GetAssetCache(AssetName); } else { this.asset = (UnityEngine.Object)AssetBundleManager.Instance.GetAssetCache(AssetName); } assetbundleLoader.Dispose(); }