Method LoadContentCatalogAsync
LoadContentCatalogAsync(string, string)
Additively load catalogs from runtime data.
Declaration
public static AsyncOperationHandle<IResourceLocator> LoadContentCatalogAsync(string catalogPath, string providerSuffix = null)
Parameters
Type | Name | Description |
---|---|---|
string | catalogPath | The path to the runtime data. |
string | providerSuffix | This value, if not null or empty, will be appended to all provider ids loaded from this data. |
Returns
Type | Description |
---|---|
AsyncOperationHandle<IResourceLocator> | The operation handle for the request. |
Remarks
You can cache content catalog by providing the hash file created for the catalog by the Addressables content build at the same URL as the catalog JSON file. The Addressables system uses this hash file to determine if the cached catalog needs to be updated. If the value in the hash file has not changed since the last time you loaded the same catalog, this function loads the cached version instead of downloading the catalog. If the hash value has changed or if no hash file is provided, Addressables downloads the catalog from the specified path before loading it into memory.
See also: Managing catalogs at runtime
LoadContentCatalogAsync(string, bool, string)
Additively load catalogs from runtime data.
Declaration
public static AsyncOperationHandle<IResourceLocator> LoadContentCatalogAsync(string catalogPath, bool autoReleaseHandle, string providerSuffix = null)
Parameters
Type | Name | Description |
---|---|---|
string | catalogPath | The path to the runtime data. |
bool | autoReleaseHandle | If true, the async operation handle will be automatically released on completion. Typically, there is no reason to hold on to the handle for this operation. |
string | providerSuffix | This value, if not null or empty, will be appended to all provider ids loaded from this data. |
Returns
Type | Description |
---|---|
AsyncOperationHandle<IResourceLocator> | The operation handle for the request. |
Remarks
You can cache content catalog by providing the hash file created for the catalog by the Addressables content build at the same URL as the catalog JSON file. The Addressables system uses this hash file to determine if the cached catalog needs to be updated. If the value in the hash file has not changed since the last time you loaded the same catalog, this function loads the cached version instead of downloading the catalog. If the hash value has changed or if no hash file is provided, Addressables downloads the catalog from the specified path before loading it into memory.
See also: Managing catalogs at runtime