Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

DLLImport causing Editor to Crash if Editor is 2017 or Newer

Discussion in 'Editor & General Support' started by silverduck, Oct 11, 2019.

  1. silverduck

    silverduck

    Joined:
    May 16, 2010
    Posts:
    27
    I'm trying to use a Plugin I developed a few years ago. I'm working in a clean new project in 2019.2.5.1 on macOS Mojave and as soon as I run any function from the plugin using...

    [DllImport(pluginName)]
    private static extern bool pluginMethodName();


    The entire editor crashes and the editor log produces the following messages...

    Fallback handler could not load library /Applications/Unity 2017.1.1f1/Unity.app/Contents/Frameworks/Mono/lib/libAssets/Plugins/PluginName.bundle/Contents/MacOS/WiiBuddy
    Fallback handler could not load library /Applications/Unity 2017.1.1f1/Unity.app/Contents/Frameworks/Mono/lib/libAssets/Plugins/PluginName.bundle/Contents/MacOS/WiiBuddy.dylib
    Fallback handler could not load library /Applications/Unity 2017.1.1f1/Unity.app/Contents/Frameworks/Mono/lib/libAssets/Plugins/PluginName.bundle/Contents/MacOS/WiiBuddy.so
    Fallback handler could not load library /Applications/Unity 2017.1.1f1/Unity.app/Contents/Frameworks/Mono/lib/libAssets/Plugins/PluginName.bundle/Contents/MacOS/WiiBuddy.bundle

    These exact same circumstances produce no problems in Unity 5.6, but everything 2017 afterwards seems to crash in the same way.

    -I've made sure the respective 32-bit and 64-bit plugin bundles are only used in the correct environment in their import settings.

    -I see that the error messages are giving a path that is within the Editor application instead of the project hierarchy. I tried adding the plugin there as well and it said I can't have it in both. Then I tried only having it inside the application folder and the Editor gave me a healthy red error saying it couldn't find the plugin.

    How should I approach this? I'm not sure what changed with 2017 onwards.
     
  2. silverduck

    silverduck

    Joined:
    May 16, 2010
    Posts:
    27
    Nevermind. I found the problem. Can't find how to delete this thread.