I need to load a random number of textures at runtime. They may or may not exist at the given URL, if the server is even up. Some of them might be local ("file:///...."). Eventually, I need to know when to give up looking for them.
Does the WWW object have a way of doing this? The .error member? Syntax?
If I can follow up on this, it seems like the 404 error is actually not in the error attribute, but in the text attribute… I’ve had no problems with actually getting the WWW code to download my files and accessing my data, but when testing rainy day scenarios, such as file not existing, etc, the isDone property seems successfully set to true, but the error property is null… after spending some time stripping down my code to the simple use of WWW on its own, I found the actual 404 not found error string was in the text property. I noticed another post on here that someone had the same problem… is this a known issue with a potential resolution, otherwise what’s a good simple way to detect this error, as the .NET XML parser seems to throw an exception when trying to parse this information. If anyone would like more information, I can post it…
Here is what I’m seeing in my Unity Web Log:
Success somehow…:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>404 Not Found</title>
</head>
<body>
<h1>Not Found</h1>
<p>The requested URL /sandboxes/applets/bootstrap/assetdownloads.xml was not found on this server.</p>
</body>
</html>