public static void OnGUI() { ExtensionName = EditorGUILayout.TextField("Extension Name", ExtensionName); PublisherName = EditorGUILayout.TextField("Publisher Name", PublisherName); Description = EditorGUILayout.TextField("Description", Description); Version = EditorGUILayout.TextField("Version", Version); string dir = Directory; EditorCommon.BrowseFolder("Directory", ref dir); if (!string.IsNullOrEmpty(dir)) { Directory = dir; } GUI.enabled = !string.IsNullOrEmpty(ExtensionName) && !string.IsNullOrEmpty(PublisherName) && !string.IsNullOrEmpty(Directory); if (GUILayout.Button("Create")) { GAnalytics.Record(GX_CREATE_EXTENSION_WIZARD); CreateScriptFile(); } GUI.enabled = true; }
public static void OnGUI() { PainterName = EditorGUILayout.TextField("Painter Name", PainterName); PainterType = EditorGUILayout.IntPopup("Type", PainterType, painterTypeLabels, painterTypeValues); string dir = Directory; EditorCommon.BrowseFolder("Directory", ref dir); if (!string.IsNullOrEmpty(dir)) { Directory = dir; } GUI.enabled = !string.IsNullOrEmpty(PainterName) && !string.IsNullOrEmpty(Directory); if (GUILayout.Button("Create")) { GAnalytics.Record(GX_CREATE_CUSTOM_PAINTER_WIZARD); CreateScriptFile(); } GUI.enabled = true; }
public static void OnGUI() { TerrainToFileConfig config = TerrainToFileConfig.Instance; config.Terrain = EditorGUILayout.ObjectField("Terrain", config.Terrain, typeof(GStylizedTerrain), true) as GStylizedTerrain; int maxLod = 0; if (config.Terrain != null && config.Terrain.TerrainData != null) { maxLod = config.Terrain.TerrainData.Geometry.LODCount; } List <int> lodValues = new List <int>(); List <string> lodLabels = new List <string>(); for (int i = 0; i < maxLod; ++i) { lodValues.Add(i); lodLabels.Add(i.ToString()); } config.LOD = EditorGUILayout.IntPopup("LOD", config.LOD, lodLabels.ToArray(), lodValues.ToArray()); config.FileType = (MeshSaver.FileType)EditorGUILayout.EnumPopup("File Type", config.FileType); string dir = config.Directory; EditorCommon.BrowseFolder("Directory", ref dir); config.Directory = dir; EditorUtility.SetDirty(config); GUI.enabled = config.Terrain != null && config.Terrain.TerrainData != null && !string.IsNullOrEmpty(config.Directory); if (GUILayout.Button("Export")) { GAnalytics.Record(GX_TERRAIN_TO_MESH); Export(); } GUI.enabled = true; }