gkngkc / UnityStandaloneFileBrowser

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

StandaloneFileBrowser.cs:16~22 #12

Closed Calvin2274 closed 6 years ago

Calvin2274 commented 7 years ago

Need change as below or have exception if run on editor.

#if UNITY_EDITOR _platformWrapper = new StandaloneFileBrowserEditor(); #elif UNITY_STANDALONE_OSX _platformWrapper = new StandaloneFileBrowserMac(); #elif UNITY_STANDALONE_WIN _platformWrapper = new StandaloneFileBrowserWindows(); #endif

gkngkc commented 7 years ago

Your build settings / target platform should be mac os x when your are on a mac. Windows platform plugins doesn't work on mac. Maybe you can improve platform wrapper selection with compiler flags like UNITY_EDITOR_WIN, UNITY_EDITOR_OSX.