Exemple #1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        PathGraph graph = target as PathGraph;

        if (GUILayout.Button("Create Node"))
        {
            PathNode node = graph.CreateRoot();
            node.transform.position    = graph.transform.position;
            Selection.activeGameObject = node.gameObject;
        }
    }