AssetRef.implicit operator T(AssetRef) Operator
Definition¶
Namespace: Brine2D.Assets
Implicit conversion so the ref can be used directly wherever T
is expected, without .Value. Throws System.InvalidOperationException if
the asset has not been loaded; only use this in code paths that run after
PreloadAsync(AssetManifest, IProgress<AssetLoadProgress>, CancellationToken) has completed. For safe access in code that
may race with Unload(AssetManifest), prefer TryGetValue(T).
public static T implicit operator T(Brine2D.Assets.AssetRef<T> assetRef);
Parameters¶
assetRef Brine2D.Assets.AssetRef<T>