void UpdatePlayIcon() { if (!HasEngineInstance() || _hotSpotPlaySound == null) { return; } _hotSpotPlaySound.ShowStopIcon = EngineFmodSound.IsPlaying(); }
/// <summary> /// Play the sound in the editor (e.g. hotspot button pressed) /// </summary> public void TogglePlaySound() { if (!HasEngineInstance()) { return; } if (EngineFmodSound.IsPlaying()) { EngineFmodSound.Stop(); } else { // Force the sound to play, even if we are not in play mode EngineFmodSound.Play(true); } UpdatePlayIcon(); }