Quantcast
Channel: Questions in topic: "assetbundles"
Viewing all articles
Browse latest Browse all 312

Assetbundle - Assets no more linked to the scene

$
0
0
Hello everybody, When I used Unity's 4.6.6, I loaded the scene's bundle then the asset's bundle (sounds and textures) with " bundle. LoadAllAssets ();" and everything was on the good place in the scene. Since I'm in 5.3.4, the scene has no more loaded assets... (the code hasn't changed) Any idea? Thanks. Code to load bundles private IEnumerator LoadBundleFromCache(string bundleURL, EBundleType bundleType, Action onComplete, Action onError) { // Wait for the Caching system to be ready while (!Caching.ready) yield return null; // Load the AssetBundle file from Cache if it exists with the same version or download and store it in the cache using (WWW download = WWW.LoadFromCacheOrDownload(bundleURL, Hash128.Parse(m_BundleInfo.Hash))) { while (!download.isDone) { yield return null; } AssetBundle bundle = download.assetBundle; if (bundleType == EBundleType.Assets) { //Add game/assets to dictionnary UnityEngine.Object[] assets = bundle.LoadAllAssets(); foreach (UnityEngine.Object asset in assets) UnityEngine.Object.DontDestroyOnLoad(asset); AssetBundleHelper.BundleCacheContainer.Add(m_GameName, assets); // Unload the AssetBundles compressed contents to conserve memory bundle.Unload(false); } else //EBundleType.Scenes bundle.LoadAllAssets(); if (onComplete != null) onComplete(); } }

Viewing all articles
Browse latest Browse all 312

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>