SHA256
Document Audio Pipeline
This commit is contained in:
22 files changed
+634
-12
No files matched your search
@@ -25,6 +25,9 @@ internal static class UnityClipLoader
|
||||
if (clip.loadType == AudioClipLoadType.Streaming)
|
||||
throw new NotSupportedException($"AudioClip '{clip.name}' is a streaming clip; GetData cannot read it.");
|
||||
|
||||
// Clips with preloadAudioData off start unloaded; LoadAudioData loads the data synchronously, or asynchronously for
|
||||
// clips with loadInBackground (GetData below then fails while the data is still loading).
|
||||
// Reference: https://docs.unity3d.com/ScriptReference/AudioClip.LoadAudioData.html
|
||||
if (clip.loadState == AudioDataLoadState.Unloaded)
|
||||
clip.LoadAudioData();
|
||||
|
||||
|
||||
Reference in new issue
Block a user