gkngkc / UnityStandaloneFileBrowser

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

DllNotFoundException: StandaloneFileBrowser MacOS #126

Closed Saraistupid closed 1 year ago

Saraistupid commented 1 year ago

I'm trying ot use SFB in my game, it works under Linux and Mac but not MacOS after building, it does work under the Editor, but using a final build gives the following error:

DllNotFoundException: StandaloneFileBrowser
  at (wrapper managed-to-native) SFB.StandaloneFileBrowserMac.DialogOpenFilePanelAsync(string,string,string,bool,SFB.StandaloneFileBrowserMac/AsyncCallback)
  at SFB.StandaloneFileBrowserMac.OpenFilePanelAsync (System.String title, System.String directory, SFB.ExtensionFilter[] extensions, System.Boolean multiselect, System.Action`1[T] cb) [0x0000f] in <a81c4eefacff42358653634b58418866>:0 
  at SFB.StandaloneFileBrowser.OpenFilePanelAsync (System.String title, System.String directory, SFB.ExtensionFilter[] extensions, System.Boolean multiselect, System.Action`1[T] cb) [0x00000] in <a81c4eefacff42358653634b58418866>:0 
  at HeavenStudio.Editor.Editor.OpenRemix () [0x0002e] in <d655906a60df4a968139e55d84d6b172>:0 
  at UnityEngine.Events.InvokableCall.Invoke () [0x00010] in <91d188b2486f48e5af8b4c4ebaf01b72>:0 
  at UnityEngine.Events.UnityEvent.Invoke () [0x00022] in <91d188b2486f48e5af8b4c4ebaf01b72>:0 
  at UnityEngine.UI.Button.Press () [0x0001c] in <d4d0cbf2dba54d24a471c0826a272360>:0 
  at UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00009] in <d4d0cbf2dba54d24a471c0826a272360>:0 
  at UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00007] in <d4d0cbf2dba54d24a471c0826a272360>:0 
  at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x0006c] in <d4d0cbf2dba54d24a471c0826a272360>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
UnityEngine.EventSystems.StandaloneInputModule:ReleaseMouse(PointerEventData, GameObject)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMousePress(MouseButtonEventData)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent(Int32)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent()
UnityEngine.EventSystems.StandaloneInputModule:Process()
UnityEngine.EventSystems.EventSystem:Update()
Saraistupid commented 1 year ago

Fixed the issue, it's really stupid. You have to set the library to Any OS and Any CPU.