Example #1
0
 private void Request_completed(AssetRequest req)
 {
     _request.completed = null;
     if (_request.assetBundle == null)
     {
         error = "assetBundle == null";
     }
     else
     {
         var manifest = _request.assetBundle.LoadAsset <BundleManifest>(_assetName);
         if (manifest == null)
         {
             error = "manifest == null";
         }
         else
         {
             AssetsManger.OnLoadManifest(manifest);
             _request.assetBundle.Unload(true);
             _request.assetBundle = null;
         }
     }
     loadState = LoadState.Loaded;
 }
Example #2
0
 public void Unload()
 {
     request.Release();
     request = null;
 }
Example #3
0
 public void Load()
 {
     request = AssetsManger.LoadAssetAsync(url, type);
 }
Example #4
0
 public void Load()
 {
     request            = AssetsManger.LoadAssetAsync(url, typeof(GameObject));
     request.completed += OnAssetLoaded;
 }
Example #5
0
 private static void AddAssetRequest(AssetRequest request)
 {
     _assets.Add(request.url, request);
     _loadingAssets.Add(request);
     request.Load();
 }
Example #6
0
 public static void UnloadAsset(AssetRequest asset)
 {
     asset.Release();
 }