SaveClipFolderPanel.cs 496 B

12345678910111213141516171819202122
  1. using UnityEngine;
  2. using UnityEditor;
  3. using System.IO;
  4. using System;
  5. namespace RootMotion
  6. {
  7. public class SaveClipFolderPanel : EditorWindow
  8. {
  9. public static string Apply(string currentPath)
  10. {
  11. string path = EditorUtility.SaveFolderPanel("Save clip(s) to folder", currentPath, "");
  12. if (path.Length != 0)
  13. {
  14. return path.Substring(path.IndexOf("Assets/"));
  15. }
  16. return currentPath;
  17. }
  18. }
  19. }