protected override void showGUI() { showAnalyseTilset(); if (linker.tilesets.Count > 0) { CustomEditorBase.Separator(); showTilesetSelector(); if (selectedTileset != null) { scroolPos = EditorGUILayout.BeginScrollView(scroolPos); showTileset(); EditorGUILayout.EndScrollView(); if (selectedTile != null) { CustomEditorBase.Separator(); showTile(); } } } else { RickEditorGUI.Label("", "No Tileset Loaded :("); } }
void showMapFiles() { CustomEditorBase.Separator(); RickEditorGUI.Label("INPUT :", selectedPath); GUILayout.Space(4); if(selectAllToglle){ selectAllToglle = RickEditorGUI.Toggle("Select all",true); if(!selectAllToglle){ for (int i = 0; i < selectedFiles.Length; i++) { selectedFiles[i] = false; } } }else{ selectAllToglle = RickEditorGUI.Toggle("Select all",false); if(selectAllToglle){ for (int i = 0; i < selectedFiles.Length; i++) { selectedFiles[i] = true; } } } GUILayout.Space(8); int index = 0; foreach (FileInfo fileInfo in files) { if(fileInfo.Exists){ selectedFiles[index] = RickEditorGUI.Toggle(fileInfo.Name, selectedFiles[index]); } index++; } }
void showTile() { RickEditorGUI.Label("Tile id", selectedTile.id + ""); GUI.changed = false; selectedTile.prefab = (GameObject)RickEditorGUI.ObjectField("Prefab", selectedTile.prefab, typeof(GameObject), false); dataChanged |= GUI.changed; }
void showInformationSection() { if (selectedFiles == null) { return; } RickEditorGUI.Label("Number of files", selectedFiles.Length + ""); }
void showTile() { RickEditorGUI.Label("Tile id", selectedTile.id + ""); GameObject beforeGameObject = selectedTile.prefab; GUI.changed = false; selectedTile.prefab = (GameObject)RickEditorGUI.ObjectField("Prefab", selectedTile.prefab, typeof(GameObject), false); dataChanged |= GUI.changed || (beforeGameObject == null && selectedTile.prefab != null) || (beforeGameObject != selectedTile.prefab); }
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 showInputSection() { RickEditorGUI.Label("Input", ""); RickEditorGUI.Label("", "Modes placeHolder"); GUI.changed = false; currentAutotile.center = showInputLine("Center", previewTextures[TILE_CENTER], currentAutotile.center); currentAutotile.cornerOutside = showInputLine("Outside Corner", previewTextures[TILE_CORNER_OUTSIDE], currentAutotile.cornerOutside); currentAutotile.side = showInputLine("Side", previewTextures[TILE_STRAIGHT], currentAutotile.side); currentAutotile.cornerInside = showInputLine("Inside Corner", previewTextures[TILE_CORNER_INSIDE], currentAutotile.cornerInside); if (GUI.changed) { dataChanged = true; shower.loadTextures(); } if (GUILayout.Button("Autoload Based on Center")) { autoLoadBasedOnCenter(); } }
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(); } }
protected override void showGUI() { showAnalyseTilset(); if (linker.tilesets.Count > 0) { CustomEditorBase.Separator(); showTilesetSelector(); if (selectedTileset != null) { showTileset(); if (selectedTile != null) { CustomEditorBase.Separator(); showTile(); } } } else { RickEditorGUI.Label("", "No Tileset Loaded :("); } }
void showPreviewSection() { RickEditorGUI.Label("Preview", ""); shower.show(); }