Class ExternalAudioLoader
A concrete implementation of ExternalFileLoaderBase<T> for loading audio files into
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: MGeLabs.Utils.Data
Assembly: cs.temp.dll.dll
Syntax
public class ExternalAudioLoader : ExternalFileLoaderBase<AudioClip>
Properties
SupportedExtensions
Gets the list of supported audio file extensions.
Declaration
protected override List<string> SupportedExtensions { get; }
Property Value
| Type | Description |
|---|---|
| List<System.String> |
Overrides
MGeLabs.Utils.Data.ExternalFileLoaderBase<AudioClip>.SupportedExtensions
Methods
GetAudioType(FileHandle)
Determines the audio type based on the file extension.
Declaration
protected virtual AudioType GetAudioType(FileHandle fileHandle)
Parameters
| Type | Name | Description |
|---|---|---|
| FileHandle | fileHandle | The file handle representing the audio file. |
Returns
| Type | Description |
|---|---|
| AudioType | The corresponding |
LoadSingleFileRoutine(FileHandle, Action<AudioClip>, Action<FileHandle, Int32>)
Loads a single audio file asynchronously.
Declaration
protected override IEnumerator LoadSingleFileRoutine(FileHandle handle, Action<AudioClip> onLoaded, Action<FileHandle, int> onError = null)
Parameters
| Type | Name | Description |
|---|---|---|
| FileHandle | handle | The file handle representing the audio file to load. |
| Action<AudioClip> | onLoaded | Callback invoked with the loaded audio clip upon success. |
| Action<FileHandle, System.Int32> | onError | Callback invoked if the audio file fails to load. |
Returns
| Type | Description |
|---|---|
| IEnumerator | An enumerator for the coroutine. |
Overrides
MGeLabs.Utils.Data.ExternalFileLoaderBase<AudioClip>.LoadSingleFileRoutine(MGeLabs.Utils.Data.FileHandle, Action<AudioClip>, Action<MGeLabs.Utils.Data.FileHandle, System.Int32>)