unity create folder if not exist code example
Example: unity create folder only if not exists
using System.IO;
//check if directory doesn't exit
if(!Directory.Exists(directoryPath))
{
//if it doesn't, create it
Directory.CreateDirectory(directoryPath);
}