I want to try and load a resource from an external asset bundle, but, if that bundle is not available, I want to load from the internal Resource directory. According to the docs I should just be able to do this check:
// Load bundle into memory if exists.
ab = AssetBundle.LoadFromFile(extUrl);
if (null == ab) return false;
And single stepping over this code seems to work, but when I do a full run, Unity suddenly throws an undocumented exception and stops the run:
Unable to open archive file: <name>
UnityEngine.AssetBundle:LoadFromFile(String)
Capturing this exception doesn’t work and although I can get around this in the editor by switching off Error Pause, that of course will mask all REAL errors. What am I doing wrong to cause loadfromfile to generate an exeption instead of just returning Null as it is supposed to?