AddressableErrorRepairer Class

public abstract class AddressableErrorRepairer : MonoBehaviour

An optional class which can be overriden to provide custom repair logic for failed addressable download operations. Basically, when one or more downloads fail, this classes AttemptRepair method will be called to try to fix the errors causing the failed downloads. If repairs were successfull, the Addressable Streamer you are using will attempt to redownload the assets. Repair is only attempted once, after which the error handling logic will be triggered.

The errors reported should be on of the following, however there is no gaurantee. You should check for one of these errors first and if not found, move on to trying to identify the error a different way. We cannot offer any advice on how to resolve/fix any of these errors.

"Request aborted" "Unable to write data" "Malformed URL" "Out of memory" "No Internet Connection" "Encountered invalid redirect (missing Location header?)" "Cannot modify request at this time" "Unsupported Protocol" "Destination host has an erroneous SSL certificate" "Unable to load SSL Cipher for verification" "SSL CA certificate error" "Unrecognized content-encoding" "Request already transmitted" "Invalid HTTP Method" "Header name contains invalid characters" "Header value contains invalid characters" "Cannot override system-specified headers" "Backend Initialization Error" "Cannot resolve proxy" "Cannot resolve destination host" "Cannot connect to destination host" "Access denied" "Generic/unknown HTTP error" "Unable to read data" "Request timeout" "Error during HTTP POST transmission" "Unable to complete SSL connection" "Redirect limit exceeded" "Received no data in response" "Destination host does not support SSL" "Failed to transmit data" "Failed to receive data" "Login failed" "SSL shutdown failed" "Redirect limit is invalid" "Not implemented" "Data Processing Error, see Download Handler error" "Unknown Error"

Methods

GetDownloadError(AsyncOperationHandle)

public static string GetDownloadError(AsyncOperationHandle fromHandle)

Gets the Remote Provider Exception Web Result Error if available. If not available, returns the outer exception as a string.

Parameters

Name Type Description
fromHandle

The handle to retrieve the error message from.

Returns

string
The error message


HandleException(AsyncOperationHandle, Exception)

public ReturnType HandleException(AsyncOperationHandle handle, Exception exception)

Method used to attempt a repair of any errors that caused the addressable asset downloads to fail. Since multiple downloads can fail, the method takes in a list of AsyncOperationHandles, each representing a failed download. You can use the GetDownloadError method to retrieve a useful error message that you may be able to use to figure out what is goign on. These error messages may be all the same, or they may be different. You may just need to fix one issue, or fix multiple issues. When the method is invoked, errorsRepaired will be empty. For each handle, you must add to the errorsRepaired list either true or false. True indicating that the error that caused the download to fail was successfully repaired, false indicating that it was not. The order of this list must match the order of the errorMessages list 1 to 1.

After the method finishes executing, the Addressable Streamer will attempt to redownload (one attempt only) assets for handles who's errors were repaired. If an error was not repaired, the streamer will try to load the lowest quality LOD asset or a Place Holder asset for the associated cell chunk, depending on the configuration of the Streamable Grid and Streamer's Fail-Safe. If fail-safe assets are not being used or cannot be downloaded, an exception is thrown.

Parameters

Name Type Description
failedHandles

The list of handles that failed.

errorsRepaired

The list detailing whether each error that caused each download to fail was repaired.

Returns

IEnumerator<YieldInstruction>
An IEnumerator<YieldInstruction> that can be iterated over or used as a coroutine. See the YieldInstruction page for more info.