Asset Bundle Throws GetOldType error?

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.

Asset bundles are version bound.

A unity iPhone 1.5 asset bundle will only work with iphone 1.5, a unity desktop 2.5 only with unity desktop 2.5

they will not work cross over as the assets are built for the specific target platform (desktop or iphone).

That it works one way at the time is more of a “grace effect” than a feature you should build upon because I would guess that it won’t remain.

So it’s coincidence that asset bundles built in 2.5 are loaded correctly and appear on an iphone device build?

This might be a problem if it doesn’t remain, my situation is I have an editor built for mac/windows standalone that creates level files on a server and references asset bundles also on that server. Then on the flip side, the level files are loaded by an iphone app for an end user. Both the editor(Mac/Win) and the player(Iphone) need to be able to load the asset bundles.

The only solution I can think of is to have 2 versions of every asset bundle, one built for IPhone and one built for Standalone editor purposes - which as you could imagine opens a whole can of worms with version control on the bundles, could introduce new bugs where one works but the other does not - why oh why!? :frowning:

The requirements towards assets for the iphone are quite a bit different than those for the desktop as many things don’t exist on the iphone and don’t make sense to bloat the filesize therefor.

You might be lucky in the way that Desktop → iphone always might work (though you just lose RAM, VRAM and performance to it due to unneeded data)