obsidian/笔记文件/2.笔记/unity判断文件夹是否存在.md
2025-03-26 00:02:56 +08:00

286 B

#unity/日常积累

可以先替换Asset/开头的路径;

!Pasted image 20221021173848.png

string dirPath = Application.dataPath + m_PrefabDirLob + pathname.Replace("Assets/", "/");  
if (!Directory.Exists(dirPath))  
{  
    Directory.CreateDirectory(dirPath);  
}