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);
        }
        internal static void EditDetail(MenuCommand item)
        {
            Terrain         terrain         = (Terrain)item.context;
            DetailPrototype detailPrototype = terrain.terrainData.detailPrototypes[item.userData];

            if (detailPrototype.usePrototypeMesh)
            {
                DetailMeshWizard detailMeshWizard = ScriptableWizard.DisplayWizard <DetailMeshWizard>("Edit Detail Mesh", "Apply");
                detailMeshWizard.InitializeDefaults((Terrain)item.context, item.userData);
            }
            else
            {
                DetailTextureWizard detailTextureWizard = ScriptableWizard.DisplayWizard <DetailTextureWizard>("Edit Grass Texture", "Apply");
                detailTextureWizard.InitializeDefaults((Terrain)item.context, item.userData);
            }
        }