Description
The LoadAsync
method is an asynchronous operation that attempts to load a sound file. It returns a Task<bool>
indicating whether the loading was successful. This method is part of the SoundFile
class, which represents a sound resource in the Sandbox environment.
Usage
To use the LoadAsync
method, you need to have an instance of the SoundFile
class. Call the method on this instance to begin loading the sound file asynchronously. The method will return a Task<bool>
, which you can await to determine if the loading was successful.
Example usage:
SoundFile soundFile = new SoundFile();
bool isLoaded = await soundFile.LoadAsync();
if (isLoaded)
{
// The sound file was loaded successfully
}
else
{
// The sound file failed to load
}
Example
SoundFile soundFile = new SoundFile();
bool isLoaded = await soundFile.LoadAsync();
if (isLoaded)
{
// The sound file was loaded successfully
}
else
{
// The sound file failed to load
}