Advertisement
eduardogr

Untitled

Sep 11th, 2021
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. GUILayout.Label("Here you can write the names of your folders", EditorStyles.largeLabel);
  2.  
  3. GUILayout.Space(_space);
  4.  
  5. int count = _folders.Count;
  6. for (_counter = 0; _counter < count; _counter++) {
  7. GUILayout.BeginHorizontal();
  8. _folders[_counter] = GUILayout.TextField(_folders[_counter]);
  9. GUILayout.Label(_counter.ToString());
  10. GUILayout.EndHorizontal();
  11. }
  12.  
  13.  
  14. if (GUILayout.Button("Add Folder")) {
  15. _folders.Add(_counter, string.Empty);
  16. string guid = AssetDatabase.CreateFolder("Assets", _folders[_counter]);
  17. AssetDatabase.GUIDToAssetPath(guid);
  18. AssetDatabase.Refresh();
  19. }
  20.  
  21.  
  22. foreach (var pair in _folders) {
  23.  
  24. Debug.Log($"ID {pair.Key} NAME {pair.Value}");
  25. }
  26.  
  27. if (GUILayout.Button("Close")) {
  28. Close();
  29. }
  30. }
  31.  
  32.  
  33. [MenuItem("Unity/Organize files")]
  34. static void OrganizeFiles() {
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement