public override void OnInspectorGUI() { CityGenerator cityGenerator = (CityGenerator)target; if (DrawDefaultInspector()) { if (cityGenerator.autoUpdate) { cityGenerator.DeleteCity(); cityGenerator.LoadBuildingsWithRectanglePlots(); } } if (GUILayout.Button("Generate")) { cityGenerator.DeleteCity(); cityGenerator.LoadBuildingsWithRectanglePlots(); } if (GUILayout.Button("Update Height")) { cityGenerator.UpdateHeight(); } }