ドキュメント

Unity Engine

Unity Engine

ready

Returns true if Caching system is ready for use.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public static bool ready { get; }

Examples

using System.Collections;using UnityEngine;using UnityEngine.Networking;public class Example : MonoBehaviour{ IEnumerator IsCachingReadyExample(string uri) { //Using this conditional says we want to wait for our Caching system to be ready before trying to download bundles while (!Caching.ready) { yield return null; } //Download the bundle UnityWebRequest request = UnityWebRequestAssetBundle.GetAssetBundle(uri); yield return request.SendWebRequest(); AssetBundle bundle = DownloadHandlerAssetBundle.GetContent(request); //Do something with the AssetBundle... //Unload the AssetBundle bundle.Unload(true); }}