I have been working with asset bundles for some time now, and never come across this error. I’ve checked and rechecked the source prefab I made the asset bundle from to check for any odd scripts or special materials/shaders to make sure it only consists of basic stuff, but still it seems to throw this error when I load it from another app I’ve created:
type.GetOldType () == NULL
UnityEngine.WWW:get_assetBundle()
UnityEngine.WWW:get_assetBundle()
<>c__CompilerGenerated0:MoveNext() (at Assets/Scripts/Utility/AssetLoader.cs:185)
The coroutine in AssetLoader.cs where this happens look like the following, and keep in mind the AssetLoader doesn’t fail on other bundles, just ones I created from inside Unity IPhone:
private IEnumerator WaitForDownload(string name, WWW loader, AssetCallback callback)
{
yield return loader;
m_NumCalls--;
if (loader.error != null)
{
Debug.LogError("AssetLoader: " + loader.error);
callback(null);
}
else if(loader != null)
{
AssetBundle ab = loader.assetBundle;
ab.name = name;
m_arrAssetBundles.Add(ab);
callback(ab);
}
else
{
Debug.LogError("AssetLoader: Unknown error.");
callback(null);
}
}
After further testing with a simple cube in Unity IPhone, turned into a prefab, then exported as an assetbundle, that one also fails when loading in the other app which is NOT unity iphone.
So my problem is - Is there a way to export from unity iphone a prefab that can be loaded by an app made in regular unity - I know exporting from unity can be imported to unity iphone app, but why not the other way around? I would like to do this over having to export many packages from unity iphone, only to import them to regular unity so I can make prefabs, it’s a lot of content we’re talking about here.