// ============ // SOUND FILE METHODS public void Bind(SoundMarker obj, Hotspot hotspot, bool startPlayback, bool reloadSoundClips) { AudioClip clip = soundDictionary.TryGetValue(hotspot.soundID, out SoundFile sf) ? sf.clip // If the sound is found, use it : SoundFile.defaultSoundFile.clip; // Fallback to default // bind these together obj.SetHotspot(hotspot, true); // with override color etc obj.LaunchNewClip(clip, playAudio: startPlayback); }
public void Bind(SoundMarker obj, SoundFile sf, bool reloadSoundClips) { // bind these obj.hotspot.Set(sf.filename); obj.LaunchNewClip(sf.clip); // When a new binding occurs, we SHOULD refresh the loaded sound clips // if (reloadSoundClips) { LoadSoundClipsExclusivelyForCurrentLayout(() => { }); } if (reloadSoundClips && layout.onDemandActive) { RefreshLoadStateForSoundMarkers(MainController.soundMarkers, () => { }); } }
public void Bind(SoundMarker obj, SoundFile sf) { // bind these obj.hotspot.Set(sf.filename); obj.LaunchNewClip(sf.clip); }