UnityEditor.AudioSourceInspector.OnEnable C# (CSharp) Method

OnEnable() private method

private OnEnable ( ) : void
return void
        private void OnEnable()
        {
            this.m_AudioClip = base.serializedObject.FindProperty("m_audioClip");
            this.m_PlayOnAwake = base.serializedObject.FindProperty("m_PlayOnAwake");
            this.m_Volume = base.serializedObject.FindProperty("m_Volume");
            this.m_Pitch = base.serializedObject.FindProperty("m_Pitch");
            this.m_Loop = base.serializedObject.FindProperty("Loop");
            this.m_Mute = base.serializedObject.FindProperty("Mute");
            this.m_Spatialize = base.serializedObject.FindProperty("Spatialize");
            this.m_Priority = base.serializedObject.FindProperty("Priority");
            this.m_DopplerLevel = base.serializedObject.FindProperty("DopplerLevel");
            this.m_MinDistance = base.serializedObject.FindProperty("MinDistance");
            this.m_MaxDistance = base.serializedObject.FindProperty("MaxDistance");
            this.m_Pan2D = base.serializedObject.FindProperty("Pan2D");
            this.m_RolloffMode = base.serializedObject.FindProperty("rolloffMode");
            this.m_BypassEffects = base.serializedObject.FindProperty("BypassEffects");
            this.m_BypassListenerEffects = base.serializedObject.FindProperty("BypassListenerEffects");
            this.m_BypassReverbZones = base.serializedObject.FindProperty("BypassReverbZones");
            this.m_OutputAudioMixerGroup = base.serializedObject.FindProperty("OutputAudioMixerGroup");
            this.m_AudioCurves = new AudioCurveWrapper[] { new AudioCurveWrapper(AudioCurveType.Volume, "Volume", 0, kRolloffCurveColor, base.serializedObject.FindProperty("rolloffCustomCurve"), 0f, 1f), new AudioCurveWrapper(AudioCurveType.SpatialBlend, "Spatial Blend", 1, kSpatialCurveColor, base.serializedObject.FindProperty("panLevelCustomCurve"), 0f, 1f), new AudioCurveWrapper(AudioCurveType.Spread, "Spread", 2, kSpreadCurveColor, base.serializedObject.FindProperty("spreadCustomCurve"), 0f, 1f), new AudioCurveWrapper(AudioCurveType.Lowpass, "Low-Pass", 3, kLowPassCurveColor, null, 0f, 1f), new AudioCurveWrapper(AudioCurveType.ReverbZoneMix, "Reverb Zone Mix", 4, kReverbZoneMixCurveColor, base.serializedObject.FindProperty("reverbZoneMixCustomCurve"), 0f, 1.1f) };
            m_CurveEditorSettings.hRangeMin = 0f;
            m_CurveEditorSettings.vRangeMin = 0f;
            m_CurveEditorSettings.vRangeMax = 1.1f;
            m_CurveEditorSettings.hRangeMax = 1f;
            m_CurveEditorSettings.vSlider = false;
            m_CurveEditorSettings.hSlider = false;
            TickStyle style = new TickStyle {
                color = new Color(0f, 0f, 0f, 0.15f),
                distLabel = 30
            };
            m_CurveEditorSettings.hTickStyle = style;
            TickStyle style2 = new TickStyle {
                color = new Color(0f, 0f, 0f, 0.15f),
                distLabel = 20
            };
            m_CurveEditorSettings.vTickStyle = style2;
            this.m_CurveEditor = new CurveEditor(new Rect(0f, 0f, 1000f, 100f), new CurveWrapper[0], false);
            this.m_CurveEditor.settings = m_CurveEditorSettings;
            this.m_CurveEditor.margin = 25f;
            this.m_CurveEditor.SetShownHRangeInsideMargins(0f, 1f);
            this.m_CurveEditor.SetShownVRangeInsideMargins(0f, 1.1f);
            this.m_CurveEditor.ignoreScrollWheelUntilClicked = true;
            this.m_LastListenerPosition = AudioUtil.GetListenerPos();
            EditorApplication.update = (EditorApplication.CallbackFunction) Delegate.Combine(EditorApplication.update, new EditorApplication.CallbackFunction(this.Update));
            Undo.undoRedoPerformed = (Undo.UndoRedoCallback) Delegate.Combine(Undo.undoRedoPerformed, new Undo.UndoRedoCallback(this.UndoRedoPerformed));
            this.m_Expanded3D = EditorPrefs.GetBool("AudioSourceExpanded3D", this.m_Expanded3D);
        }