NativeRenderingPlugin icon indicating copy to clipboard operation
NativeRenderingPlugin copied to clipboard

Apple Silicon and Unity 2021.3.8f1 - DllNotFoundException: RenderingPlugin assembly:<unknown assembly> type:<unknown type> member:(null)

Open belveder79 opened this issue 3 years ago • 8 comments

I can't get the plugin to load on Apple Silicon Unity:

arth@mbp: Plugins % lipo -i RenderingPlugin.dylib                                   
Architectures in the fat file: RenderingPlugin.dylib are: x86_64 arm64

I also tried with the .bundle instead of a dylib but no help. I had to remove the VALID_ARCHS user define from the xcode project in order to get arm64 into it, but whatever I do it is not loaded.

Am I missing something here?

belveder79 avatar Sep 03 '22 19:09 belveder79

Same problem, any solutions?

linyouhui avatar Oct 10 '22 03:10 linyouhui

Not from my side. The weird thing is that I wrote some plugin based on this code some time ago and it actually loads, but does only render outside the editor on Silicon. So it seems that it works, but only if I build an app. Testing in the editor did not work for me...

belveder79 avatar Oct 10 '22 21:10 belveder79

I use .dylib, with a x64 & arm64 combined binary as you do. Make sure any cpu is selected in the meta/inspector of the dll in unity, otherwise it won't work.

In c# my dll import is libXYZ.dylib too, just to be clear (in a package)

SoylentGraham avatar Nov 01 '22 16:11 SoylentGraham

Hi, I have same problem, with Apple Silicon Metal, it doesnt work. I try Kejiro Texture Plugin -> works. What I have to do, to get this Plugin working. Is it work on the Editor ? Should I compile it with XCode, to build a ..... version ?

Any Explanation would be great

DirkGummel avatar Mar 03 '23 08:03 DirkGummel

I have same problem, has any one solved it?

TienYoung avatar Jun 11 '23 16:06 TienYoung

I can't get the plugin to load on Apple Silicon Unity:

arth@mbp: Plugins % lipo -i RenderingPlugin.dylib                                   
Architectures in the fat file: RenderingPlugin.dylib are: x86_64 arm64

I also tried with the .bundle instead of a dylib but no help. I had to remove the VALID_ARCHS user define from the xcode project in order to get arm64 into it, but whatever I do it is not loaded.

Am I missing something here?

Finally, I have succeeded, simply delete the VALID_ARCHS.

TienYoung avatar Jun 11 '23 17:06 TienYoung

9ff79bb0a4eca5010462cdee1602316e29543ab2 Here is my commit. I just remove OpenGLES on macOS and iOS.

TienYoung avatar Jun 11 '23 17:06 TienYoung

9ff79bb Here is my commit. I just remove OpenGLES on macOS and iOS.

Thanks so much for this, it is working. Just build @TienAska NativePlugin in XCode, then open the Unity Project. Open the scene named scene in the asset folder, then navigate to File > Build Settings and click on: Add open scenes. After this click on build (Intel + apple silicon) and it works.

If you want select create a XCodeProj, then all you need to do is --deep to Other signing flags and it's running flawlessly or delete libRenderingPlugin.so and then it will also run flawlessly.

bvoq avatar Nov 28 '23 12:11 bvoq