Ejemplo n.º 1
0
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            DragDropDrawer.DrawMatchingChannel(matchingChannel, new GUIContent("Matching Channel"));
            EditorGUILayout.PropertyField(matchingTag, new GUIContent("Matching Tag"));

            displayEvents = EditorGUILayout.Foldout(displayEvents, "Serialized DragDropEvents");
            if (displayEvents)
            {
                EditorGUILayout.PropertyField(m_OnItemExit, new GUIContent("On Item Exit"));
                EditorGUILayout.PropertyField(m_OnItemEnter, new GUIContent("On Item Enter"));
                EditorGUILayout.PropertyField(m_OnItemDetach, new GUIContent("On Item Detach"));
                EditorGUILayout.PropertyField(m_OnItemAttach, new GUIContent("On Item Attach"));
            }

            if (Application.isPlaying)
            {
                GUILayout.BeginVertical("box");
                GUILayout.Label(dragDropTarget.GetDebugString(), DragDropDrawer.LabelStyle);
                GUILayout.EndVertical();
            }

            serializedObject.ApplyModifiedProperties();
        }
Ejemplo n.º 2
0
 public override bool RequiresConstantRepaint()
 {
     return(DragDropDrawer.RequiresConstantRepaint());
 }