Пример #1
0
        public static GraphEditorWindow ShowWindow()
        {
            GraphEditorWindow window = EditorWindow.GetWindow <GraphEditorWindow>(false, "Graph Editor");

            window.minSize = new Vector2(500f, 100f);
            return(window);
        }
 public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
 {
     EditorGUI.BeginProperty(position, label, property);
     if (GUI.Button(position, label, EditorStyles.objectField))
     {
         GraphEditorWindow window   = GraphEditorWindow.ShowWindow();
         IGraphProvider    behavior = (IGraphProvider)property.GetParent();
         window.Load <T>(behavior, property.serializedObject.targetObject);
     }
     EditorGUI.EndProperty();
 }