ResourcesExt.Load<T> Method

Loads a resource asynchronously.

Namespace: UltimateXR.Extensions.Unity.IO
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

public static Task<T> Load<T>(
	string filePath,
	CancellationToken ct = default
)
where T : Object


Parameters

 

filePath
Type: System.String
The path relative to a Resources folder
ct (Optional)
Type: System.Threading.CancellationToken
Optional cancellation token, to cancel the operation

Type Parameters

 

T
Resource type to load

Return Value

Type: Task<T>
Awaitable Task that returns the loaded resource

See Also

Reference

ResourcesExt Class
UltimateXR.Extensions.Unity.IO Namespace