private static TerrainData GetActiveTerrainData() { if (TerrainMenus.GetActiveTerrain()) { return(TerrainMenus.GetActiveTerrain().terrainData); } return(null); }
private static TerrainData GetActiveTerrainData() { if ((bool)((Object)TerrainMenus.GetActiveTerrain())) { return(TerrainMenus.GetActiveTerrain().terrainData); } return((TerrainData)null); }
internal static void ImportRaw() { string text = EditorUtility.OpenFilePanel("Import Raw Heightmap", "", "raw"); if (text != "") { ImportRawHeightmap importRawHeightmap = TerrainWizard.DisplayTerrainWizard <ImportRawHeightmap>("Import Heightmap", "Import"); importRawHeightmap.InitializeImportRaw(TerrainMenus.GetActiveTerrain(), text); } }
private static TerrainData GetActiveTerrainData() { TerrainData result; if (TerrainMenus.GetActiveTerrain()) { result = TerrainMenus.GetActiveTerrain().terrainData; } else { result = null; } return(result); }
private static void FlushHeightmapModification() { TerrainMenus.GetActiveTerrain().Flush(); }
internal static void RefreshPrototypes() { TerrainMenus.GetActiveTerrainData().RefreshPrototypes(); TerrainMenus.GetActiveTerrain().Flush(); EditorApplication.SetSceneRepaintDirty(); }
internal static void Flatten() { FlattenHeightmap flattenHeightmap = TerrainWizard.DisplayTerrainWizard <FlattenHeightmap>("Flatten Heightmap", "Flatten"); flattenHeightmap.InitializeDefaults(TerrainMenus.GetActiveTerrain()); }
internal static void MassPlaceTrees() { PlaceTreeWizard placeTreeWizard = TerrainWizard.DisplayTerrainWizard <PlaceTreeWizard>("Place Trees", "Place"); placeTreeWizard.InitializeDefaults(TerrainMenus.GetActiveTerrain()); }
internal static void ExportHeightmapRaw() { ExportRawHeightmap exportRawHeightmap = TerrainWizard.DisplayTerrainWizard <ExportRawHeightmap>("Export Heightmap", "Export"); exportRawHeightmap.InitializeDefaults(TerrainMenus.GetActiveTerrain()); }
internal static void ImportRaw() { string path = EditorUtility.OpenFilePanel("Import Raw Heightmap", string.Empty, "raw"); if (!(path != string.Empty)) { return; } TerrainWizard.DisplayTerrainWizard <ImportRawHeightmap>("Import Heightmap", "Import").InitializeImportRaw(TerrainMenus.GetActiveTerrain(), path); }
internal static void RefreshPrototypes() { TerrainMenus.GetActiveTerrainData().RefreshPrototypes(); TerrainMenus.GetActiveTerrain().Flush(); }
internal static void SetHeightmapResolution() { SetResolutionWizard setResolutionWizard = ScriptableWizard.DisplayWizard <SetResolutionWizard>("Set Heightmap resolution", "Set Resolution"); setResolutionWizard.InitializeDefaults(TerrainMenus.GetActiveTerrain()); }