public override void OnInspectorGUI() { audioInfo = (AudioInfo)target; EditorGUI.BeginChangeCheck(); if (!audioInfo.init) { audioInfo.Start(); } else { Update(); } serializedObject.Update(); EditorGUILayout.PropertyField(serializedObject.FindProperty("fadeIn")); EditorGUILayout.PropertyField(serializedObject.FindProperty("fadeInCurve")); EditorGUILayout.PropertyField(serializedObject.FindProperty("fadeOut")); EditorGUILayout.PropertyField(serializedObject.FindProperty("fadeOutCurve")); EditorGUILayout.PropertyField(serializedObject.FindProperty("randomVolume")); EditorGUILayout.PropertyField(serializedObject.FindProperty("randomPitch")); EditorGUILayout.PropertyField(serializedObject.FindProperty("delay")); EditorGUILayout.PropertyField(serializedObject.FindProperty("syncMode")); EditorGUILayout.PropertyField(serializedObject.FindProperty("doNotKill")); EditorGUILayout.PropertyField(serializedObject.FindProperty("effects"), true); ShowRTPCs(); ShowBuses(); EditorGUILayout.PropertyField(serializedObject.FindProperty("clipInfo"), true); serializedObject.ApplyModifiedProperties(); if (EditorGUI.EndChangeCheck()) { EditorUtility.SetDirty(target); } }