public override void OnInspectorGUI() { DrawDefaultInspector(); GroundController groundController = (GroundController)target; if (GUILayout.Button("Randomize Terrain")) { groundController.Randomize(); groundController.GenerateMap(); } if (GUILayout.Button("Erode Terrain")) { foreach (int i in Enumerable.Range(0, 3)) { groundController.ErodeMap(); } } if (GUILayout.Button("Generate Resources")) { groundController.GenerateResourcesAndDoodads(); } }