public void LoadManifestAssetBundle(string abPath) { SetupAbRoot(abPath); _coreManifest = _loader.GetAsset <AssetBundleManifest>(abPath, "AssetBundleManifest"); if (_coreManifest != null) { _manifestLoaded = true; } }
public void LoadManifestAssetBundle(string abPath) { _coreManifest = _loader.GetAsset <AssetBundleManifest>(abPath, "AssetBundleManifest"); if (_coreManifest != null) { _coreManifestDir = Path.GetDirectoryName(abPath); _manifestLoaded = true; } }
public T GetAsset <T>(string abPath, string assetName) where T : Object { T asset = GetAssetFromCache <T>(abPath, assetName); if (asset == null) { asset = _abLoader?.GetAsset <T>(abPath, assetName); SetAssetToCache(abPath, assetName, asset); } return(asset); }
/// <summary> /// 同步获取资源 /// </summary> /// <typeparam name="T">资源类型</typeparam> /// <param name="abPath">资源ab包路径</param> /// <param name="assetName">资源名</param> public T GetAsset <T>(string abPath, string assetName) where T : UnityEngine.Object { return(_loader?.GetAsset <T>(abPath, assetName)); }