UnityStandaloneFileBrowser
UnityStandaloneFileBrowser copied to clipboard
User home dir shortcuts don't work
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.
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.
Yes, I too was confused about this behavior. Is there any workaround?
WORKAROUND: %userprofile% can be derived by: Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)