We’re using LoadFromFileAsync() to load asset bundles and so far I haven’t found a way to catch error it could produce.
So far, this is what we’re doing, but there’s no details on what went wrong:
var abLoader = AssetBundle.LoadFromFileAsync(cachedFile);
yield return abLoader;
while (!abLoader.isDone)
{
// Error handling here is atrocious
yield return null;
}
var ab = abLoader.assetBundle;
if (ab == null)
{
NotifyUser($"Error loading asset bundle {ot.bundle_name}", "LoadFromFileAsync failed");
yield break;
}
Since there are many things which can go wrong here, from network IO to file corruption, we’d like to get more info on what is stopping the asset bundle from being loaded.