Beispiel #1
0
    public override void OnInspectorGUI()
    {
        TreeGenerator treeGen = (TreeGenerator)target;

        if (DrawDefaultInspector())
        {
            if (treeGen.autoUpdate)
            {
                treeGen.GenerateTreeMesh();
            }
        }

        if (GUILayout.Button("Generate"))
        {
            treeGen.GenerateTree();
        }

        if (GUILayout.Button("Generate Next Iteration"))
        {
            treeGen.GenerateNextIteration();
        }

        if (GUILayout.Button("Reset"))
        {
            treeGen.Reset();
        }
    }