MissingDependencyException

This exception can be thrown by AssetStorage.loadSync if dependencies of an asset were scheduled for asynchronous loading, but are not loaded yet. AssetStorage.loadSync will not wait for the assets and instead will throw this exception.

If AssetStorage.loadSync was not used, this exception is only ever thrown when trying to access assets via AssetManagerWrapper. It is then typically only caused by AssetLoader instances or a AssetLoaderParameters.LoadedCallback.

If you did not use AssetStorage.loadSync, it usually means that AssetLoader attempts to access an asset that either:

  • Is already unloaded.

  • Failed to load with exception.

  • Was not listed by AssetLoader.getDependencies.

  • Has not loaded yet, which should never happen if the dependency was listed correctly.

It can also be caused by an AssetLoaderParameters.LoadedCallback assigned to an asset when it tries to access unloaded assets with AssetManagerWrapper.get.

Normally this exception is only expected in case of concurrent loading and unloading of the same asset, or when mixing synchronous AssetStorage.loadSync with asynchronous AssetStorage.load or AssetStorage.loadAsync. If it occurs otherwise, the AssetLoader associated with the asset might incorrectly list its dependencies.

Constructors

Link copied to clipboard
constructor(identifier: Identifier<*>, cause: Throwable? = null)
constructor(message: String, cause: Throwable? = null)

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard
open val message: String?

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard