gkngkc / UnityStandaloneFileBrowser

A native file browser for unity standalone platforms
MIT License
2.01k stars 317 forks source link

User home dir shortcuts don't work #120

Open ghostravenstorm opened 2 years ago

ghostravenstorm commented 2 years ago

Shortcuts to the user's home dir like %userprofile% on Windows and ~/ on Linux don't work as expected when summoning the open file panel.

var paths = SFB.StandaloneFileBrowser.OpenFilePanel("Open File", "%userprofile%", extensions, false);

Using %userprofile% for example opens the panel on the same executing dir with .../UnityApp/%userprofile%/ in the file name field. image Using C:/Users/user instead corrects this behaviour to open on the user's home dir be default as desired, but its silly to hardcode user names.