// -------------------------- private void LoadClipInSoundFileOnCoroutine(SoundFile sf, SoundMarker marker, System.Action <SoundFile> completion = null) { if (sf.isDefaultSoundFile || (sf.loadState == LoadState.Success && sf.clip != null)) { if (marker != null) { marker.OnDemandSoundFileClipWasLoaded(sf); } completion(sf); return; } sf.loadState = LoadState.Loading; _managerDelegate?.StartCoroutineOn(SoundFile.LoadClipInSoundFile(sf, completion: (SoundFile returnedSoundFile) => { _managerDelegate?.OnDemandLoadingLoadedAudioClipsChanged(this); if (marker != null) { marker.OnDemandSoundFileClipWasLoaded(returnedSoundFile); } completion(returnedSoundFile); })); }