public override void OnInspectorGUI() { DrawDefaultInspector(); VacuumSound script = (VacuumSound)target; if (GUILayout.Button("Start Engine")) { if (Application.isPlaying) { script.StartEngine(); } } if (GUILayout.Button("Stop Engine")) { if (Application.isPlaying) { script.StopEngine(); } } if (GUI.changed) { EditorUtility.SetDirty(vacuumSound); } serializedVacuumSound.ApplyModifiedProperties(); }
public void MuteCommonSounds() { string busString = "Bus:/UsualSounds"; FMOD.Studio.Bus bus; bus = RuntimeManager.GetBus(busString); bus.setFaderLevel(0f); ambientSound.GetComponent <FMODUnity.StudioEventEmitter>().Stop(); vaccuumSound.StopEngine(); Debug.Log("MUTE"); }
private void UpdateDustSuckerStatus(bool status) { dustSuckerActive = status; if (dustSuckerActive) { sound.StartEngine(); } else { sound.StopEngine(); } }
public override void OnInspectorGUI() { DrawDefaultInspector(); VacuumSound script = (VacuumSound)target; if (GUILayout.Button("Start Engine")) { script.StartEngine(); } if (GUILayout.Button("Stop Engine")) { script.StopEngine(); } }