[ad_1]
I have to create a NPM bundle containing a bundle for Unity. I would like to make use of native code, i. e. a local library. The bundle must assist:
- Home windows x86 64bit
- Linux x86 64bit
- Embedded Linux ARM
I’ve written the code for the three native libraries and the C# glue code. Every library is in its personal subdirectory inside the bundle folder construction and Unity has generated a meta file every time. I. e., I’ve
<bundle root>/
├── bundle.json
├── README.md
├── (different recordsdata)
└── belongings/
├── Runtime.meta
└── Runtime/
└── Plugins/
├── arm.meta
├── arm/
│ ├── libConnect.so
│ └── libConnect.so.meta
├── linux.meta
├── linux/
│ ├── libConnect.so
│ └── libConnect.so.meta
├── home windows.meta
└── home windows/
├── Join.DLL
└── Join.DLL.meta
Relying on the platform I construct for, I would like Unity to make use of the suitable native library.
Nevertheless, I can not seem to set the properties on the native libs to the proper values utilizing the Unity Inspector on the libraries. Particularly, I can’t appear to set the Embedded Linux ARM lib to ARM CPU with out the Linux lib additionally altering to ARM CPU. Vice versa, changint the Linux lib to “Intel 64-bit” CPU additionally units the Embedded Linux ARM lib to that CPU. Additionally, the home windows DLL at all times appears to finish up in Embedded Linux builds, it doesn’t matter what settings I take advantage of. I attempted in- and excluding completely different platforms for various libs, however nonetheless, adjustments to 1 lib appear to magically mess up adjustments I made to the opposite libs.
Please inform me how I can achive my purpose, to have three native libs for various platforms and have Unity use the proper one relying on which platform I construct for.
[ad_2]