Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
belveder79 opened this issue Sep 3, 2022 · 8 comments

Comments

@belveder79
Copy link

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?

@linyouhui
Copy link

Same problem, any solutions?

@belveder79
Copy link
Author

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...

@SoylentGraham
Copy link

SoylentGraham commented Nov 1, 2022

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)

@DirkGummel
Copy link

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

@TienAska
Copy link

I have same problem, has any one solved it?

@TienAska
Copy link

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.

@TienAska
Copy link

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

@bvoq
Copy link

bvoq commented Nov 28, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants