/// <summary> /// 释放这个AB包里的单个资源 /// </summary> public void UnloadAsset(string bundleName, string assetName) { if (resObj.ContainsKey(bundleName)) { AssetResObj tmpAsset = resObj[bundleName]; tmpAsset.UnloadAsset(assetName); } }
/// <summary> /// 释放这个AB包里的所有资源 /// </summary> /// <param name="bundleName"></param> public void UnloadAsset(string bundleName) { if (resObj.ContainsKey(bundleName)) { AssetResObj tmpAsset = resObj[bundleName]; tmpAsset.UnloadAsset(); } Resources.UnloadUnusedAssets(); }