LoginSignup
2

More than 5 years have passed since last update.

OSXのUnityでgdiplusが読めないと言われた時

Posted at

Unityの実行時にファイルを読み込みたい!

ということで、UnityStarndaloneFileBrowser を使いたかったのですが、
OSXではgdiplus.dllが読めないとエラーが発生したので解決法を探しました。
他にもこのライブラリを使うプラグイン等あるようなので同じ解決策で行けるかと思います。

UnityStarndaloneFileBrowser

https://github.com/gkngkc/UnityStandaloneFileBrowser

ネイティブのファイルダイアログを開くプラグインです

環境

OSX 10.13.1
Unity: 2017.2.0f3

解決策

  • 次のファイルを編集します。
/Applications/Unity.app/Contents/Mono/etc/mono/config
  • 以下を追加します。 </configuration> の直前ぐらいに記述すればいいと思います。
    <dllmap dll="gdiplus" target="/tmp/unity-monodevelop-monoframework-4.0.5/lib/libgdiplus.dylib" os="!windows"/>
    <dllmap dll="gdiplus.dll" target="/tmp/unity-monodevelop-monoframework-4.0.5/lib/libgdiplus.dylib"  os="!windows"/>
    <dllmap dll="gdi32" target="/tmp/unity-monodevelop-monoframework-4.0.5/lib/libgdiplus.dylib" os="!windows"/>
    <dllmap dll="gdi32.dll" target="/tmp/unity-monodevelop-monoframework-4.0.5/lib/libgdiplus.dylib" os="!windows"/>
  • Unityを再起動すれば解決(のはず)

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2