public void Dispose()
 {
     if (mRequest != null)
     {
         if (mRequest.isDone)
         {
             if (mRequest.asset != null)
             {
                 BundleManager.ReleaseObject(mRequest.asset);
             }
         }
         else
         {
             mRequest.completed += op =>
             {
                 if (mRequest.asset != null)
                 {
                     BundleManager.ReleaseObject(mRequest.asset);
                 }
             };
         }
     }
 }
示例#2
0
 private void Update()
 {
     BundleManager.Update();
 }
示例#3
0
 private void OnDestroy()
 {
     BundleManager.OnDestroy();
 }
 /// <summary>
 /// Is specified asset exist in current bundle settings?
 /// </summary>
 public static bool Exists(this IBundledAssetPath path)
 {
     return(BundleManager.IsAssetExist(path.GetBundleName(), path.GetAssetName()));
 }
 /// <summary>
 /// Load AssetAsync
 /// </summary>
 public static BundleRequest <T> LoadAsync <T>(this IBundledAssetPath path) where T : Object
 {
     return(BundleManager.LoadAsync <T>(path.GetBundleName(), path.GetAssetName()));
 }
 /// <summary>
 /// Is specified asset exist in current bundle settings?
 /// </summary>
 public bool Exists()
 {
     return(BundleManager.IsAssetExist(BundleName, AssetName));
 }
 /// <summary>
 /// Load AssetAsync
 /// </summary>
 public BundleRequest <T> LoadAsync <T>() where T : Object
 {
     return(BundleManager.LoadAsync <T>(BundleName, AssetName));
 }
 /// <summary>
 /// Load Asset
 /// </summary>
 public T Load <T>() where T : Object
 {
     return(BundleManager.Load <T>(BundleName, AssetName));
 }