public static void ShowWindow(EnvironmentalPainter painter, int prefabIndex)
        {
            MassPlacementGUI window = GetWindow <MassPlacementGUI>();

            window.terrain     = painter.Terrain;
            window.painter     = painter;
            window.prefabIndex = prefabIndex;
            window.prefab      = painter.Settings.GetPrefabs()[prefabIndex];
            window.density     = painter.Settings.density;
            window.scaleMin    = painter.Settings.scaleMin;
            window.scaleMax    = painter.Settings.scaleMax;
            window.maxRotation = painter.Settings.maxRotation;

            window.titleContent = new GUIContent("Mass Placement");
            window.ShowUtility();
        }
 private static void MassPlacementContextHandler(TerrainGenerator instance, int i)
 {
     MassPlacementGUI.ShowWindow(instance.EnvironmentalPainter, i);
 }