Method LoadAssetAsync
LoadAssetAsync<TObject>()
Overrides the asset's default type. This loads a type from AssetTable with the TableReference and the
the asset that matchesTableEntryReference.
This helps to filter sub-assets when trying to load them and they share a common type among other sub-assets with the same name.
For example, an asset could have the following structure:
Main Asset [GameObject]
- Sub Asset[GameObject]
- Sub Asset[Mesh]
If you were using a LocalizedObject, callingLoadAsset orLoadAssetAsObjectAsync() to load
"Main Asset/Sub Asset" would return the first matching asset. In this case, this would be the GameObject version.
With this method, you could provide the type Mesh to filter out the GameObject version and return the Mesh.
Declaration
public abstract AsyncOperationHandle<TObject> LoadAssetAsync<TObject>() where TObject : Object
Returns
Type | Description |
---|---|
AsyncOperationHandle<TObject> | Returns the loading operation for the request. |
Type Parameters
Name | Description |
---|---|
TObject | The type to use instead of the default. |