Esempio n. 1
0
        internal static void AddDetailTexture(MenuCommand item)
        {
            DetailTextureWizard detailTextureWizard = TerrainWizard.DisplayTerrainWizard <DetailTextureWizard>("Add Grass Texture", "Add");

            detailTextureWizard.m_DetailTexture = (Texture2D)null;
            detailTextureWizard.InitializeDefaults((Terrain)item.context, -1);
        }
Esempio n. 2
0
        internal static void AddDetailMesh(MenuCommand item)
        {
            DetailMeshWizard detailMeshWizard = TerrainWizard.DisplayTerrainWizard <DetailMeshWizard>("Add Detail Mesh", "Add");

            detailMeshWizard.m_Detail = (GameObject)null;
            detailMeshWizard.InitializeDefaults((Terrain)item.context, -1);
        }
Esempio n. 3
0
        static internal void AddDetailMesh(MenuCommand item)
        {
            DetailMeshWizard wizard = TerrainWizard.DisplayTerrainWizard <DetailMeshWizard>("Add Detail Mesh", "Add");

            wizard.m_Detail = null;
            wizard.InitializeDefaults((Terrain)item.context, -1);
        }
Esempio n. 4
0
        internal static void ImportRaw()
        {
            string path = EditorUtility.OpenFilePanel("Import Raw Heightmap", string.Empty, "raw");

            if (path != string.Empty)
            {
                TerrainWizard.DisplayTerrainWizard <ImportRawHeightmap>("Import Heightmap", "Import").InitializeImportRaw(GetActiveTerrain(), path);
            }
        }
Esempio n. 5
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);
            }
        }
Esempio n. 6
0
        internal static void ImportRaw()
        {
            string saveLocation = EditorUtility.OpenFilePanel("Import Raw Heightmap", "", "raw");

            if (saveLocation != "")
            {
                ImportRawHeightmap wizard = TerrainWizard.DisplayTerrainWizard <ImportRawHeightmap>("Import Heightmap", "Import");
                wizard.InitializeImportRaw(GetActiveTerrain(), saveLocation);
            }
        }
Esempio n. 7
0
 internal static void EditDetail(MenuCommand item)
 {
     if (((Terrain)item.context).terrainData.detailPrototypes[item.userData].usePrototypeMesh)
     {
         TerrainWizard.DisplayTerrainWizard <DetailMeshWizard>("Edit Detail Mesh", "Apply").InitializeDefaults((Terrain)item.context, item.userData);
     }
     else
     {
         TerrainWizard.DisplayTerrainWizard <DetailTextureWizard>("Edit Grass Texture", "Apply").InitializeDefaults((Terrain)item.context, item.userData);
     }
 }
        static internal void EditDetail(MenuCommand item)
        {
            Terrain         terrain   = (Terrain)item.context;
            DetailPrototype prototype = terrain.terrainData.detailPrototypes[item.userData];

            if (prototype.usePrototypeMesh)
            {
                TerrainWizard.DisplayTerrainWizard <TerrainDetailMeshWizard>("Edit Detail Mesh", "Apply").ResetDefaults((Terrain)item.context, item.userData);
            }
            else
            {
                TerrainWizard.DisplayTerrainWizard <TerrainDetailTextureWizard>("Edit Grass Texture", "Apply").ResetDefaults((Terrain)item.context, item.userData);
            }
        }
Esempio n. 9
0
        internal static void Flatten()
        {
            FlattenHeightmap wizard = TerrainWizard.DisplayTerrainWizard <FlattenHeightmap>("Flatten Heightmap", "Flatten");

            wizard.InitializeDefaults(GetActiveTerrain());
        }
Esempio n. 10
0
        internal static void MassPlaceTrees()
        {
            PlaceTreeWizard wizard = TerrainWizard.DisplayTerrainWizard <PlaceTreeWizard>("Place Trees", "Place");

            wizard.InitializeDefaults(GetActiveTerrain());
        }
Esempio n. 11
0
        internal static void ExportHeightmapRaw()
        {
            ExportRawHeightmap wizard = TerrainWizard.DisplayTerrainWizard <ExportRawHeightmap>("Export Heightmap", "Export");

            wizard.InitializeDefaults(GetActiveTerrain());
        }
Esempio n. 12
0
 static internal void AddDetailTexture(MenuCommand item)
 {
     TerrainWizard.DisplayTerrainWizard <DetailTextureWizard>("Add Grass Texture", "Add").InitializeDefaults((Terrain)item.context, -1);
 }
Esempio n. 13
0
        internal static void Flatten()
        {
            FlattenHeightmap flattenHeightmap = TerrainWizard.DisplayTerrainWizard <FlattenHeightmap>("Flatten Heightmap", "Flatten");

            flattenHeightmap.InitializeDefaults(TerrainMenus.GetActiveTerrain());
        }
Esempio n. 14
0
        internal static void ExportHeightmapRaw()
        {
            ExportRawHeightmap exportRawHeightmap = TerrainWizard.DisplayTerrainWizard <ExportRawHeightmap>("Export Heightmap", "Export");

            exportRawHeightmap.InitializeDefaults(TerrainMenus.GetActiveTerrain());
        }
Esempio n. 15
0
 internal static void MassPlaceTrees()
 {
     TerrainWizard.DisplayTerrainWizard <PlaceTreeWizard>("Place Trees", "Place").InitializeDefaults(TerrainMenus.GetActiveTerrain());
 }
 internal static void EditTree(MenuCommand item)
 {
     TerrainWizard.DisplayTerrainWizard<TreeWizard>("Edit Tree", "Apply").InitializeDefaults((Terrain) item.context, item.userData);
 }
 internal static void AddTree(MenuCommand item)
 {
     TerrainWizard.DisplayTerrainWizard<TreeWizard>("Add Tree", "Add").InitializeDefaults((Terrain) item.context, -1);
 }
Esempio n. 18
0
 static internal void AddDetailMesh(MenuCommand item)
 {
     TerrainWizard.DisplayTerrainWizard <TerrainDetailMeshWizard>("Add Detail Mesh", "Add").ResetDefaults((Terrain)item.context, -1);
 }