- Home /
Best Answer
Answer by Protogenos · Sep 03, 2013 at 03:32 AM
using System.IO;
///class blah blah
// and method blah, blah
//check if directory doesn't exit
if(!Directory.Exists(directoryPath))
{
//if it doesn't, create it
Directory.CreateDirectory(directoryPath);
}
Answer by e4lime · Mar 06, 2015 at 12:22 PM
You can now do:
AssetDatabase.IsValidFolder(string path);
An important point is that AssetDatabase
is in UnityEditor namespace, so it won't work at run-time.