- Home /
Question by
kyudonggyun · Dec 27, 2016 at 04:11 AM ·
androiddirectory
how do i get list of filename in folder? (android)
hi
i want list of filename in "Asssets/StreamingAssets/TextureFolder"
but failed load list
my code
string filename = "TextureFolder";
string path = Application.streamingAssetsPath + '/' + filename;
string[] strArr = Directory.GetFiles(path).Length;
help me please
Comment
Answer by steo · Dec 27, 2016 at 07:07 AM
string[] strArr = Directory.GetFiles(path).Length;
You tries to assign int value to string[] variable. Right way is:
string[] strArr = Directory.GetFiles(path);
Your answer
![](https://koobas.hobune.stream/wayback/20220612103412im_/https://answers.unity.com/themes/thub/images/avi.jpg)