Plays system beep sound.
// Play sound on mouse down event function OnGUI () { if (Event.current.type == EventType.MouseDown) EditorApplication.Beep(); }
// Play beep sound on menu click
using UnityEditor; using UnityEngine;
public class BeepExample { [MenuItem("Examples/Play beep")] static void DoBeep() { EditorApplication.Beep(); } }
Did you find this page useful? Please give it a rating: