Caching.GetCachedVersions

매뉴얼로 전환
public static void GetCachedVersions (string assetBundleName, List<Hash128> outCachedVersions);

파라미터

assetBundleNameThe AssetBundle name.
outCachedVersionsList of all the cached version.

설명

Returns all cached versions of the given AssetBundle.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;

public class Example : MonoBehaviour { IEnumerator GetCachedVersionExample(string uri) { //Download the bundle UnityWebRequest request = UnityWebRequestAssetBundle.GetAssetBundle(uri); yield return request.SendWebRequest(); AssetBundle bundle = DownloadHandlerAssetBundle.GetContent(request);

//Get all the cached versions List<Hash128> listOfCachedVersions = new List<Hash128>(); Caching.GetCachedVersions(bundle.name, listOfCachedVersions);

//use listOfCachedVersions hashes to perform actions on Caches... } }
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961