private void addSubGroup(object userData) { TrackContextData trackData = userData as TrackContextData; if (trackData != null) { GameObject item = CutsceneItemFactory.CreateSubTrackGroup(trackData.TrackGroup, trackData.Type, trackData.Label).gameObject; this.isExpanded = true; Undo.RegisterCreatedObjectUndo(item, string.Format("Create {0}", item.name)); } }