private static void NewEventArea(AudioEvent audioevent) { var defaultAlignment = GUI.skin.label.alignment; EditorGUILayout.BeginHorizontal(); GUI.skin.label.alignment = TextAnchor.MiddleLeft; EditorGUILayout.LabelField(""); EditorGUILayout.EndHorizontal(); Rect lastArea = GUILayoutUtility.GetLastRect(); lastArea.height *= 1.5f; if (GUI.Button(lastArea, "Click or drag here to add event")) { ShowCreationContext(audioevent); } if (Event.current.type != EventType.Repaint) { var dragging = DragAndDrop.objectReferences; OnDragging.OnDraggingObject(dragging, lastArea, objects => AudioEventWorker.CanDropObjects(audioevent, dragging), objects => AudioEventWorker.OnDrop(audioevent, dragging)); } GUI.skin.label.alignment = defaultAlignment; }
protected override void OnDrop(InAudioEventNode audioevent, Object[] objects) { AudioEventWorker.OnDrop(audioevent, objects); treeDrawer.SelectedNode = audioevent; }
protected override void OnDrop(AudioEvent audioevent, Object[] objects) { AudioEventWorker.OnDrop(audioevent, objects); }