コード例 #1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        if (GUILayout.Button("Generate"))
        {
            TerrainGenerator generator = (TerrainGenerator)target;
            generator.Generate();
        }
        else if (GUILayout.Button("Clear"))
        {
            TerrainGenerator generator = (TerrainGenerator)target;
            generator.Clear();
        }
    }