public static void LoadAsync(string abName, Action <AssetBundle> callback) { if (string.IsNullOrEmpty(abName)) { Debug.LogError("abName or assetName is null!!!"); if (callback != null) { callback(null); } return; } Action <AssetLoadData> tCallBack = null; if (callback != null) { tCallBack = (data) => { callback(data.mAsset as AssetBundle); }; } HAssetBundle res = Get <HAssetBundle>(abName, "", AssetType.eAB); res.StartLoad(false, false, false, tCallBack); }
public static AssetBundle Load(string abName) { if (string.IsNullOrEmpty(abName)) { Debug.LogError("abName or assetName is null!!!"); return(null); } HAssetBundle res = Get <HAssetBundle>(abName, "", AssetType.eAB); res.StartLoad(true, false, false, null); return(res.AssetData.mAsset as AssetBundle); }