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

Support for native libraries #90

Closed
visose opened this issue Feb 5, 2022 · 2 comments · Fixed by #91
Closed

Support for native libraries #90

visose opened this issue Feb 5, 2022 · 2 comments · Fixed by #91
Labels
enhancement New feature or request PR welcome Extra attention is needed

Comments

@visose
Copy link
Contributor

visose commented Feb 5, 2022

I was thinking of adding a package that contains native libraries. It works well in Unity but requires modifying the .meta files so that they target the corresponding platform and architecture. Also, for Windows there might be two .dll files with the same name, one for x86 and one for x64. Only one should be enabled to work in the Editor.

I skimmed over the source code and it doesn't seem to be support for this, only for managed assemblies (I might be wrong).

Nuget supports these by placing them on specific folders, so the meta files can be adjusted depending on these folders, for example:
runtimes\win-x64\native\file.dll
runtimes\win-x86\native\file.dll
runtimes\osx-x64\native\file.dylib

Some more info here:
https://docs.microsoft.com/en-us/nuget/create-packages/supporting-multiple-target-frameworks

@xoofx xoofx added enhancement New feature or request PR welcome Extra attention is needed labels Feb 5, 2022
@xoofx
Copy link
Owner

xoofx commented Feb 5, 2022

Don't have personal time to work on this, but it's definitely possible and not difficult. PR welcome.

@visose
Copy link
Contributor Author

visose commented Feb 6, 2022

I can make an attempt, but would it be ok if the PR is not exhaustive of everything that can go inside the runtimes folder?

This folder can contain both native and managed libraries that are platform specific. Also, mobile and other platforms besides standalone, and different versions of windows (win7, win10).

For the time being I could add only native libraries for standalone (win, linux, mac). This covers what I need at the moment, but if any one else has a package in mind with mobile or other platforms it could be added later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PR welcome Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants