- Home /
EditorUtility.OpenFilePanel uses \ FileInfo.Name uses /
Hi I am making an automation (CustomInspector) to handle export packages.
i am using "EditorUtility.OpenFolderPanel" and "EditorUtility.OpenFilePanel" which work fine, but then i use this :
for (int count = 0; count < pl.ExcludeFolders.Count; count++)
{
Debug.Log("exclude started");
string directoryPath = pl.ExcludeFolders[count].excludeFolderString;
DirectoryInfo dir = new DirectoryInfo(directoryPath);
FileInfo[] info = dir.GetFiles("*.*", SearchOption.AllDirectories);
foreach (FileInfo f in info)
{
if (includeFileList.Contains(f.Name))
{
int index = includeFileList.IndexOf(f.Name);
if (index != -1)
{
includeFileList.RemoveAt(index);
Debug.Log("Removed " + f);
}
}
}
}
This also works but the strings is using \ instead of /
Comment