Пример #1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        bool generateGrid = GUILayout.Button("Generate", GUILayout.Height(2 * EditorGUIUtility.singleLineHeight));
        bool clearGrid    = GUILayout.Button("Clear", GUILayout.Height(2 * EditorGUIUtility.singleLineHeight));

        if (generateGrid)
        {
            _myTarget.Draw();
        }
        if (clearGrid)
        {
            _myTarget.Clear();
        }
    }