void showOptions() { loadToPrefab = RickEditorGUI.Toggle("Load As Prefab", loadToPrefab); if (loadToPrefab) { prefabFolder = RickEditorGUI.FolderPath("Asset Prefab Folder", prefabFolder, RickEditorGUI.assetFolder); } CustomEditorBase.Separator(); filePath = RickEditorGUI.FilePath("Map ", filePath, RickEditorGUI.rootFolder, "tmx"); }
protected override void showGUI() { string path = RickEditorGUI.FolderPath("Change Map folder", "", RickEditorGUI.rootFolder); if(!string.IsNullOrEmpty(path)){ loadMapsInfos(path); } if(files != null){ showMapFiles(); showOutputPanel(); } }
void showOutputPanel() { CustomEditorBase.Separator(); RickEditorGUI.Label("Output",""); GUILayout.Space(4); const string seprateTooltip = "Determine whether the Tiles are loaded in Parent GameObjects based on the Tile's Layer or all tiles are put in the same parent."; separatePrefabByTiledLayers = RickEditorGUI.Toggle("Use Layers", seprateTooltip, separatePrefabByTiledLayers); loadToPrefab = RickEditorGUI.Toggle("Load As Prefab", loadToPrefab); if (loadToPrefab) { prefabFolder = RickEditorGUI.FolderPath("Asset Prefab Folder", prefabFolder, RickEditorGUI.assetFolder); } showButton(); }
void showOutputSection() { RickEditorGUI.Label("Output-Tiled AutoTiles", ""); currentAutotile.tilesFileName = EditorGUILayout.TextField("TilesetName.tmx", currentAutotile.tilesFileName); if (GUILayout.Button("Export")) { currentAutotile.autoTileFilePath = EditorUtility.SaveFilePanel("Autotile file", RickEditorGUI.rootFolder, "autotile", "tmx"); //currentAutotile.autoTileFilePath = "C:/Users/The User/Documents/Unity Games/jeux/ITT1_EndlessTowerClimber/autotile.tmx"; export(); } CustomEditorBase.Separator(); RickEditorGUI.Label("Output-Create Prefab", ""); currentAutotile.basePrefab = (GameObject)EditorGUILayout.ObjectField("Base prefab", currentAutotile.basePrefab, typeof(GameObject), false); currentAutotile.outputAssetFolder = RickEditorGUI.FolderPath("Destination folder", currentAutotile.outputAssetFolder, RickEditorGUI.assetFolder); if (GUILayout.Button("Make Copies")) { makeCopie(); } }