public static void ShowWindow()
        {
            TextureExporterGUI window = GetWindow <TextureExporterGUI>();

            window.titleContent = new GUIContent("Texture Exporter");
            window.Show();
        }
        public static void ShowWindow(TerrainGenerator terrain, TextureExporter.TextureType type)
        {
            TextureExporterGUI window = GetWindow <TextureExporterGUI>();

            window.titleContent     = new GUIContent("Texture Exporter");
            window.source           = TextureExporter.Source.FromMeshFilter;
            window.targetMeshFilter = terrain.MeshFilterComponent;
            window.fileName         = string.Format("{0}-{1}", terrain.name, type.ToString());
            window.textureType      = type;
            window.Show();
        }
Ejemplo n.º 3
0
        private static void ShowExportDataContextMenu(Rect r, TerrainGenerator instance)
        {
            GenericPopup menu = new GenericPopup();

            menu.AddItem(
                new GUIContent("3D file from Mesh"),
                false,
                () => { MeshSaverGUI.ShowWindow(instance); });
            menu.AddSeparator();
            menu.AddItem(
                new GUIContent("UV layout"),
                false,
                () => { TextureExporterGUI.ShowWindow(instance, TextureExporter.TextureType.UvLayout); });
            menu.AddItem(
                new GUIContent("Vertex color map"),
                false,
                () => { TextureExporterGUI.ShowWindow(instance, TextureExporter.TextureType.VertexColor); });
            menu.AddItem(
                new GUIContent("Height map"),
                false,
                () => { HeightMapExporterGUI.ShowWindow(instance); });
            menu.Show(r);
        }
Ejemplo n.º 4
0
 public static void ShowTextureExporter()
 {
     TextureExporterGUI.ShowWindow();
 }