public override void OnInspectorGUI()
    {
        serializedObject.Update();

        EditorGUILayout.PropertyField(_playChance);

        _volume.vector2Value = GUILayoutHelpers.MinMaxSlider("Volume", _volume.vector2Value, 0, 1);
        _pitch.vector2Value  = GUILayoutHelpers.MinMaxSlider("Pitch", _pitch.vector2Value, -3, 3);
        _reverb.vector2Value = GUILayoutHelpers.MinMaxSlider("Reverb", _reverb.vector2Value, 0, 1.1f);

        EditorGUILayout.PropertyField(_loop);
        EditorGUILayout.PropertyField(_clipRef);

        var newClip = _clip.Load();

        if (newClip != _loaded)
        {
            _loaded = newClip;
            StopPlaying();
        }

        var oldPrefab = _audioSourcePrefab.objectReferenceValue;

        EditorGUILayout.PropertyField(_audioSourcePrefab, true);
        if (!ReferenceEquals(oldPrefab, _audioSourcePrefab.objectReferenceValue))
        {
            StopPlaying();
        }

        SoundCue self = (SoundCue)target;

        var wasEnabled = GUI.enabled;

        if (_source == null)
        {
            GUI.enabled = (_loaded != null) && (self.audioSourcePrefab != null);
            if (GUILayout.Button("Play"))
            {
                string unused;
                var    clipToPlay = _loaded.RandomClip(Random.value, out unused);
                if (clipToPlay != null)
                {
                    var go = (GameObject)GameObject.Instantiate(self.audioSourcePrefab.gameObject, Vector3.zero, Quaternion.identity);
                    go.hideFlags = HideFlags.HideAndDontSave;

                    _source = go.GetComponent <AudioSource>();
                    go.AddComponent <AudioSourceGC>();

                    _source.spatialBlend  = 0f;
                    _source.clip          = clipToPlay;
                    _source.volume        = self.RandomVolume(Random.value);
                    _source.pitch         = self.RandomPitch(Random.value);
                    _source.reverbZoneMix = self.RandomReverb(Random.value);
                    _source.loop          = _loop.boolValue;
                    _source.Play();

                    EditorApplication.update += Update;
                }
            }
        }
        else
        {
            GUI.enabled = true;
            if (GUILayout.Button("Stop"))
            {
                StopPlaying();
            }
        }
        GUI.enabled = wasEnabled;

        serializedObject.ApplyModifiedProperties();
    }