Search Unity

Native (non-universal) libraries fail to load in player, for projects upgraded to 2017.3

Discussion in 'macOS' started by Aphid, Feb 10, 2018.

  1. Aphid

    Aphid

    Joined:
    Dec 16, 2013
    Posts:
    14
    2017.3 made changes to its mac support (removing 32bit support). As part of this, it seems the way native plugins are loaded changed slightly (for non-unified libraries, at least). Unfortunately, the project upgrade process does not fully account for this, and so a project made with a prior version of Unity, upon loading into 2017.3 and upgrading, will produce broken .app files.

    Unity used to place native files into 'Game.app/Plugins/x86_64' (for 64 bit). It now places them into 'Game.app/Plugins'.

    However, the import settings for your .bundle, upon upgrading to 2017.3, will continue to configure Unity to place them in the old location. When you try to run the compiled game outside of the editor, the runtime will not find the library and throw a DllNotFoundException.

    The work-around is to delete your .meta files for all libraries, and then reload the editor. The newly-generated .meta files will work correctly in 2017.3. They may not work in previous Unity versions, however.
     
    Nyarlathothep likes this.