Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GUILayout.Label("Here you can write the names of your folders", EditorStyles.largeLabel);
- GUILayout.Space(_space);
- int count = _folders.Count;
- for (_counter = 0; _counter < count; _counter++) {
- GUILayout.BeginHorizontal();
- _folders[_counter] = GUILayout.TextField(_folders[_counter]);
- GUILayout.Label(_counter.ToString());
- GUILayout.EndHorizontal();
- }
- if (GUILayout.Button("Add Folder")) {
- _folders.Add(_counter, string.Empty);
- string guid = AssetDatabase.CreateFolder("Assets", _folders[_counter]);
- AssetDatabase.GUIDToAssetPath(guid);
- AssetDatabase.Refresh();
- }
- foreach (var pair in _folders) {
- Debug.Log($"ID {pair.Key} NAME {pair.Value}");
- }
- if (GUILayout.Button("Close")) {
- Close();
- }
- }
- [MenuItem("Unity/Organize files")]
- static void OrganizeFiles() {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement