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

Asset bundle resources becoming null.

$
0
0
So...whenever I load this assetbundle and store the asset in a gameobject, and then try to refer to it, it exists -- but one frame later it's turned null, and doesn't exist in the list I've stored it in, either. I've tried using Unload(false) on the asset bundle -- this will STOP unity from unloading the bundle's in-scene data, right? But it doesn't change anything. Really what I want is to load the bundle, place the bundle's contents in a list, and then unload the bundle. What am I doing wrong? IEnumerator Start () { yield return BundleUtils.instance.StartCoroutine("LoadBundle", new BundleArgs(1, _testURL)); ab = BundleUtils.instance.GetLoadedBundle(); GameObject abGo = ab.Load("BearMovie") as GameObject; //can instantiate here, or print the name of abgo, but it's null after here! _menu._items.Insert(0, new BenchmarkItem(BenchmarkMenuAction.AddPrefab, abGo)); }

Viewing all articles
Browse latest Browse all 312

Trending Articles