Beispiel #1
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        EditorGUI.BeginChangeCheck();

        blockGrid.depth = EditorGUILayout.IntSlider("Depth", blockGrid.depth, 1, 10);

        if (EditorGUI.EndChangeCheck())
        {
            foreach (GameObject block in blockGrid.blocks)
            {
                DestroyImmediate(block);
            }

            blockGrid.blocks.Clear();

            blockGrid.CreateBlockGrid();
        }
    }