Beispiel #1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();
        BoardGenerator boardGenerator = (BoardGenerator)target;

        size      = EditorGUILayout.IntField("Size", size);
        depth     = EditorGUILayout.IntField("Depth", depth);
        connector = EditorGUILayout.Toggle("Connector", connector);

        if (GUILayout.Button("Generate"))
        {
            boardGenerator.Create(size, depth, connector);
        }

        if (GUILayout.Button("Generate Random"))
        {
            boardGenerator.CreateRandom();
        }
    }