loadContents

abstract fun loadContents(asset: FileAsset, inBandBytes: ByteArray): Boolean

Override to customize the asset loading process.

Return

true if the asset was loaded, false refuse loading. Returning false can be useful when using multiple FileAssetLoaders in a FallbackAssetLoader and you want to delegate loading to the next loader.

Parameters

asset

The FileAsset being loaded. This contains metadata about the asset, e.g. its name and CDN URL when hosted by Rive.

inBandBytes

The embedded bytes that were included in the Rive file. This will be empty if the asset was marked as "Referenced" or "Hosted" in the Rive editor.