yasirkula / UnitySimpleFileBrowser

A uGUI based runtime file browser for Unity 3D (draggable and resizable)
MIT License
819 stars 111 forks source link

have a way to show how much files exists in a folder? #35

Closed frere97 closed 3 years ago

frere97 commented 3 years ago

hey man, there is a way to show how much files exists in a folder?

frere97 commented 3 years ago

and sorry, i dont know how to not mark as a bug XD

yasirkula commented 3 years ago

You can use Directory.GetFiles (returns files), GetDirectories (returns folders) or GetFileSystemEntries (returns files and folders) to get contents of a folder. Then simply check the length of the array. If you want to display this information on SimpleFileBrowser dialog, then you will have to modify the SimpleFileBrowserCanvas prefab as you wish and update the Text you've created with validFileEntries.Count at the end of FileBrowser.RefreshFiles function.

frere97 commented 3 years ago

thanks i will try this

frere97 commented 3 years ago

i´ve made it, thanks man