private void OnGUI() { showHeightMap = GUILayout.Toggle(showHeightMap, "HeightMap"); if (showHeightMap) { if (genHeightMap) { heightMapTex = TextureGenerator.GetHeightTexture(width, length, gen); genHeightMap = false; } GUILayout.Label(heightMapTex); } else { genHeightMap = true; } showHeatMap = GUILayout.Toggle(showHeatMap, "HeatMap"); if (showHeatMap) { if (genHeatMap) { heatMapTex = TextureGenerator.GetHeatTexture(width, length, gen); genHeatMap = false; } GUILayout.Label(heatMapTex); } else { genHeatMap = true; } showMoinstureMap = GUILayout.Toggle(showMoinstureMap, "MoinstureMap"); if (showMoinstureMap) { if (genMoinstureMap) { moinstureMapTex = TextureGenerator.GetMoinstureTexture(width, length, gen); genMoinstureMap = false; } GUILayout.Label(moinstureMapTex); } else { genMoinstureMap = true; } }