AudioClipExt.FromFile Method

Asynchronously reads and loads an AudioClip into memory from a given uri

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

Syntax

C#

public static Task<AudioClip> FromFile(
	string uri,
	CancellationToken ct = default
)

Parameters

 

uri
Type: System.String
Full path for AudioClip file
ct (Optional)
Type: System.Threading.CancellationToken
The optional cancellation token, to cancel the task

Return Value

Type: Task(AudioClip)
Loaded AudioClip

Exceptions

ExceptionCondition
HttpUwrExceptionHttpError flag is on
NetUwrExceptionNetworkError flag is on
OperationCanceledExceptionThe task was canceled using ct

See Also

Reference

AudioClipExt Class
UltimateXR.Extensions.Unity.Audio Namespace