Exemplo 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);
        }
Exemplo 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);
        }
Exemplo 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);
        }
Exemplo 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);
            }
        }
Exemplo 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);
            }
        }
Exemplo 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);
            }
        }
Exemplo 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);
     }
 }
Exemplo n.º 8
0
        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);
            }
        }
Exemplo n.º 9
0
        internal static void Flatten()
        {
            FlattenHeightmap wizard = TerrainWizard.DisplayTerrainWizard <FlattenHeightmap>("Flatten Heightmap", "Flatten");

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

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

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

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

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