예제 #1
0
 private static TerrainData GetActiveTerrainData()
 {
     if (TerrainMenus.GetActiveTerrain())
     {
         return(TerrainMenus.GetActiveTerrain().terrainData);
     }
     return(null);
 }
예제 #2
0
 private static TerrainData GetActiveTerrainData()
 {
     if ((bool)((Object)TerrainMenus.GetActiveTerrain()))
     {
         return(TerrainMenus.GetActiveTerrain().terrainData);
     }
     return((TerrainData)null);
 }
예제 #3
0
        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);
            }
        }
예제 #4
0
        private static TerrainData GetActiveTerrainData()
        {
            TerrainData result;

            if (TerrainMenus.GetActiveTerrain())
            {
                result = TerrainMenus.GetActiveTerrain().terrainData;
            }
            else
            {
                result = null;
            }
            return(result);
        }
예제 #5
0
 private static void FlushHeightmapModification()
 {
     TerrainMenus.GetActiveTerrain().Flush();
 }
예제 #6
0
 internal static void RefreshPrototypes()
 {
     TerrainMenus.GetActiveTerrainData().RefreshPrototypes();
     TerrainMenus.GetActiveTerrain().Flush();
     EditorApplication.SetSceneRepaintDirty();
 }
예제 #7
0
        internal static void Flatten()
        {
            FlattenHeightmap flattenHeightmap = TerrainWizard.DisplayTerrainWizard <FlattenHeightmap>("Flatten Heightmap", "Flatten");

            flattenHeightmap.InitializeDefaults(TerrainMenus.GetActiveTerrain());
        }
예제 #8
0
        internal static void MassPlaceTrees()
        {
            PlaceTreeWizard placeTreeWizard = TerrainWizard.DisplayTerrainWizard <PlaceTreeWizard>("Place Trees", "Place");

            placeTreeWizard.InitializeDefaults(TerrainMenus.GetActiveTerrain());
        }
예제 #9
0
        internal static void ExportHeightmapRaw()
        {
            ExportRawHeightmap exportRawHeightmap = TerrainWizard.DisplayTerrainWizard <ExportRawHeightmap>("Export Heightmap", "Export");

            exportRawHeightmap.InitializeDefaults(TerrainMenus.GetActiveTerrain());
        }
예제 #10
0
        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);
        }
예제 #11
0
 internal static void RefreshPrototypes()
 {
     TerrainMenus.GetActiveTerrainData().RefreshPrototypes();
     TerrainMenus.GetActiveTerrain().Flush();
 }
예제 #12
0
        internal static void SetHeightmapResolution()
        {
            SetResolutionWizard setResolutionWizard = ScriptableWizard.DisplayWizard <SetResolutionWizard>("Set Heightmap resolution", "Set Resolution");

            setResolutionWizard.InitializeDefaults(TerrainMenus.GetActiveTerrain());
        }