void showAnalyseTilset() { GUI.changed = false; tilesetPath = RickEditorGUI.FilePath("Load Tileset", tilesetPath, RickEditorGUI.rootFolder, "tsx", true); if (GUI.changed) { loadTileset(tilesetPath); } }
void showAnalyseTilset() { GUI.changed = false; tilesetPath = RickEditorGUI.FilePath("Load Tileset", tilesetPath, RickEditorGUI.rootFolder, "tsx", RickEditorGUI.FilePathOptions.KEEP_EXTENTION); if (GUI.changed) { loadTileset(tilesetPath); } }
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"); }
void OnGUI() { prefabFilePath = RickEditorGUI.FilePath("Prefab to rotate", prefabFilePath, RickEditorGUI.resourcesFolder, "prefab"); if (CustomEditorBase.Button(new GUIContent("Make rotated prefab"))) { string filePath = "Assets/Resources" + prefabFilePath; GameObject prefabToRotate = (GameObject)AssetDatabase.LoadAssetAtPath(filePath + ".prefab", typeof(GameObject)); int dotIndex = filePath.LastIndexOf('/'); string fileFolder = filePath.Substring(0, dotIndex); nameRotation(prefabToRotate, fileFolder, "90", new Vector3(0, 0, 90)); nameRotation(prefabToRotate, fileFolder, "180", new Vector3(0, 0, 180)); nameRotation(prefabToRotate, fileFolder, "-90", new Vector3(0, 0, -90)); } }
void showSelectOrCreateLinkerPanel() { GUI.changed = false; linkerPath = RickEditorGUI.FilePath("Load Linker", linkerPath, RickEditorGUI.assetFolder, "asset", true); if (GUI.changed) { loadNewLinker(); onLinkerLoaded(); } CustomEditorBase.Separator(); if (GUILayout.Button("CreateNewLinker")) { createNewLinker(); } }