How do i detect the error: WWW: out of memory

Hi,

I am loading a large amount of assetbundles continuously. Sometimes a bundle will fail with the error “WWW: out of memory” in the console causing everything to fail.

How can i detect this error in code?

I have tied the following:

WWW w = new WWW( req.path );      

try
{			
    yield return w;   

    if( w.error != null )
    {
        Debug.Log( "ERROR" ); // Never gets called
    } 

    // Do stuff
}
finally
{
    if( w.error != null )
    {
        Debug.Log( "ERROR" ); // Never gets called
    } 
}

Thanks

Karl

The docs say the ‘error’ field is for errors during download. Maybe it downloaded but failed during unpacking. Have you tried checking for w.assetBundle == null?