1. 程式人生 > >unity editor模式下讀取資料夾資源

unity editor模式下讀取資料夾資源

string path = EditorUtility.OpenFolderPanel("Load png Textures", "", "");  //開啟資料夾
string[] files = Directory.GetFiles(path);  //獲取所有檔案路徑

Object[] os = new Object[] { AssetDatabase.LoadAssetAtPath(f2, typeof(UnityEngine.Sprite)) };  //load 資源