public void AddAudioMixerGroup(AudioMixerGroupController parent) { if (parent == null || m_Controller == null) { return; } Undo.RecordObjects(new UnityEngine.Object[] { m_Controller, parent }, "Add Child Group"); var newGroup = m_Controller.CreateNewGroup("New Group", true); m_Controller.AddChildToParent(newGroup, parent); m_Controller.AddGroupToCurrentView(newGroup); Selection.objects = new[] { newGroup }; m_Controller.OnUnitySelectionChanged(); m_AudioGroupTree.SetSelection(new int[] { newGroup.GetInstanceID() }, true); ReloadTree(); m_AudioGroupTree.BeginNameEditing(0f); }