public static void GetSelectionFileList(ParseSelectionHandler handler, string prompt = null) { if (handler == null) { return; } Object[] objects = Selection.objects; if (objects == null) { Debug.Log("没有选中任何文件"); return; } List <string> selectFiles = new List <string>(); for (int i = 0; i < objects.Length; i++) { string path = AssetDatabase.GetAssetPath(objects[i]); if (string.IsNullOrEmpty(path)) { continue; } CollectFiles(path, handler, prompt); } EditorUtility.ClearProgressBar(); }
public static void GetSelectionFileList(string select, ParseSelectionHandler handler, string prompt = null) { if (handler == null) { return; } if (string.IsNullOrEmpty(select)) { GetSelectionFileList(handler, prompt); } else { CollectFiles(select, handler, prompt); EditorUtility.ClearProgressBar(); } }
public static void GetSelectionFileList(List <string> selects, ParseSelectionHandler handler, string prompt = null) { if (handler == null || selects == null || selects.Count <= 0) { return; } for (int i = 0; i < selects.Count; i++) { string path = selects[i]; if (string.IsNullOrEmpty(path)) { continue; } CollectFiles(path, handler, prompt); } EditorUtility.ClearProgressBar(); }