object NetworkedAssetLoader
// Initialize the loader
NetworkedAssetLoader.init(File(applicationContext.getCacheDir().canonicalPath), OkHttpAssetFetcher())
// The ECS will use the networkedAssetLoader to download files that start with "http" and "https"
val modelUrl = Uri.parse("https://example.com/model.glb")
entity.setComponent(Mesh(modelUrl))
| Name | Summary |
|---|---|
TAG | const val TAG: String |
| Name | Summary |
|---|---|
init | fun init(downloadDirectory: File, assetFetcher: AssetFetcher) Initializes the loader with a download directory and asset fetcher. |
requestAsset | fun requestAsset(url: <Error class: unknown class>, extension: String): CompletableFuture<String> Requests an asset from a remote source. |