- We tried to build MacOS version of our Unity Game with GOG SDK Version : 1.144.1
and the build failed with error in Unity 2021.3.2f1, 2021.3.8f1, and 2022.20b6 on MacOS Monterey 12.3.1 :
Building /Users//.app/Contents/PlugIns/Galaxy.bundle/Contents/MacOS/libGalaxyCSharpGlue.dylib failed with output:
Failed because this command failed to write the following output files: /Users//.app/Contents/PlugIns/Galaxy.bundle/Contents/_CodeSignature/CodeResources
This is from the Editor log :
System.Exception: Could not find executable at â/Users//.app/Contents/PlugIns/Galaxy.bundle/Contents/MacOS/Galaxyâ inside a bundle.
From a Editor log message above, it shows that Unity could not find executable at .app/Contents/PlugIns/Galaxy.bundle/Contents/MacOS/Galaxy
- From previous errors, we got a workaround to build the game by renaming âlibGalaxy.dylibâ and âlibGalaxyCSharpGlue.dylibâ to âGalaxyâ and âGalaxyCSharpGlueâ with no extensions and can build successfully but then when we run the game, it produces this error log :
DllNotFoundException: Unable to load DLL âGalaxyCSharpGlueâ. Tried the load the following dynamic libraries: Unable to load dynamic library âGalaxyCSharpGlueâ because of 'Failed to open the requested dynamic library (0x06000000) dlerror() = dlopen(GalaxyCSharpGlue, 0x0005): tried: âGalaxyCSharpGlueâ (no such file), â/usr/local/lib/GalaxyCSharpGlueâ (no such file), â/usr/lib/GalaxyCSharpGlueâ (no such file), â/Users//GalaxyCSharpGlueâ (no such file)
- It appears that âGalaxyCSharpGlueâ needs to be in the directory that contains our gameâs .app file. So, we tried moving GalaxyCSharpGlue to that directory then we encountered a different error:
DllNotFoundException: Unable to load DLL âGalaxyCSharpGlueâ. Tried the load the following dynamic libraries: Unable to load dynamic library âGalaxyCSharpGlueâ because of 'Failed to open the requested dynamic library (0x06000000) dlerror() = dlopen(GalaxyCSharpGlue, 0x0005): tried: âGalaxyCSharpGlueâ (mach-o file, but is an incompatible architecture (have âx86_64â, need âarm64eâ)), â/usr/local/lib/GalaxyCSharpGlueâ (no such file), â/usr/lib/GalaxyCSharpGlueâ (no such file), â/Users//GalaxyCSharpGlueâ (mach-o file, but is an incompatible architecture (have âx86_64â, need âarm64eâ))
- We tried renaming âGalaxyCSharpGlueâ back to âGalaxyCSharpGlue.bundleâ , âGalaxyCSharpGlue,dylibâ, and â âlibGalaxyCSharpGlue.dylibâ but nothing work.