InitializeDefaults() private method

private InitializeDefaults ( Terrain terrain, int index ) : void
terrain UnityEngine.Terrain
index int
return void
Example #1
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);
        }
        internal static void AddDetailMesh(MenuCommand item)
        {
            DetailMeshWizard detailMeshWizard = ScriptableWizard.DisplayWizard <DetailMeshWizard>("Add Detail Mesh", "Add");

            detailMeshWizard.m_Detail = null;
            detailMeshWizard.InitializeDefaults((Terrain)item.context, -1);
        }
Example #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);
        }
        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);
            }
        }