public override void OnInspectorGUI() { CompoundButtonSounds soundButton = (CompoundButtonSounds)target; GUI.color = Color.white; soundButton.SoundProfile = HUXEditorUtils.DrawProfileField <ButtonSoundProfile>(soundButton.SoundProfile); if (soundButton.SoundProfile == null) { HUXEditorUtils.SaveChanges(target); return; } HUXEditorUtils.DrawProfileInspector(soundButton.SoundProfile, soundButton); }
public override void OnInspectorGUI() { CompoundButtonSounds soundButton = (CompoundButtonSounds)target; GUI.color = Color.white; profileProp.objectReferenceValue = HUXEditorUtils.DrawProfileField <ButtonSoundProfile>(profileProp.objectReferenceValue as ButtonSoundProfile); if (soundButton.Profile == null) { HUXEditorUtils.SaveChanges(target, serializedObject); return; } HUXEditorUtils.DrawProfileInspector(soundButton.Profile, soundButton); HUXEditorUtils.SaveChanges(target, serializedObject); serializedObject.ApplyModifiedProperties(); }