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; }
public void Unload() { request.Release(); request = null; }
public void Load() { request = AssetsManger.LoadAssetAsync(url, type); }
public void Load() { request = AssetsManger.LoadAssetAsync(url, typeof(GameObject)); request.completed += OnAssetLoaded; }
private static void AddAssetRequest(AssetRequest request) { _assets.Add(request.url, request); _loadingAssets.Add(request); request.Load(); }
public static void UnloadAsset(AssetRequest asset) { asset.Release(); }