Table of Contents

Method GetOrLoadSubAssetAsync

Namespace
GrindFest.Content
Assembly
GrindFest.dll

GetOrLoadSubAssetAsync<T>(string, string, AssetTier, CancellationToken)

A sub-object selected by name from a parent asset, loaded asynchronously — the only sub-asset load there is now that the synchronous door was deleted along with Addressables.

It needs no name matching of its own: a sub-asset is a content entry under parent[Name] like any other, so this is the ordinary load. That is what lets one .fbx hold several clips (Shield@Block01.fbx holds _Hit and _Hold) without either of them shadowing the model node that carries the same name.

public static Task<T> GetOrLoadSubAssetAsync<T>(string parentAddress, string objectName, AssetTier tier = AssetTier.Definition, CancellationToken ct = default) where T : Object

Parameters

parentAddress string
objectName string
tier AssetTier
ct CancellationToken

Returns

Task<T>

Type Parameters

T