コード例 #1
0
 public override void OnInspectorGUI()
 {
     if (GUILayout.Button("Open base graph window"))
     {
         DefaultGraphWindow.Open().InitializeGraph(target as BaseGraph);
     }
     if (GUILayout.Button("Open custom context menu graph window"))
     {
         CustomContextMenuGraphWindow.Open().InitializeGraph(target as BaseGraph);
     }
 }
コード例 #2
0
    // protected override void CreateInspector()
    // {
    // }

    protected override void CreateInspector()
    {
        base.CreateInspector();

        root.Add(new Button(() => DefaultGraphWindow.Open().InitializeGraph(target as BaseGraph))
        {
            text = "Open base graph window"
        });
        root.Add(new Button(() => CustomContextMenuGraphWindow.Open().InitializeGraph(target as BaseGraph))
        {
            text = "Open custom context menu graph window"
        });
        root.Add(new Button(() => CustomToolbarGraphWindow.Open().InitializeGraph(target as BaseGraph))
        {
            text = "Open custom toolbar graph window"
        });
        root.Add(new Button(() => ExposedPropertiesGraphWindow.Open().InitializeGraph(target as BaseGraph))
        {
            text = "Open exposed properties graph window"
        });
    }