Home Game Development Multi-OS/Arch NPM plugin for Unity

Multi-OS/Arch NPM plugin for Unity

0
Multi-OS/Arch NPM plugin for Unity

[ad_1]

I need to create a NPM package containing a package for Unity. I need to use native code, i. e. a native library. The package needs to support:

  • Windows x86 64bit
  • Linux x86 64bit
  • Embedded Linux ARM

I have written the code for the three native libraries and the C# glue code. Each library is in its own subdirectory inside of the package folder structure and Unity has generated a meta file each time. I. e., I have

    <package root>/
    ├── package.json
    ├── README.md
    ├── (other files)
    └── assets/
        ├── Runtime.meta
        └── Runtime/
            └── Plugins/
                ├── arm.meta
                ├── arm/
                │   ├── libConnect.so
                │   └── libConnect.so.meta
                ├── linux.meta
                ├── linux/
                │   ├── libConnect.so
                │   └── libConnect.so.meta
                ├── windows.meta
                └── windows/
                    ├── Connect.DLL
                    └── Connect.DLL.meta

Depending on the platform I build for, I’d like Unity to use the appropriate native library.

However, I can’t seem to set the properties on the native libs to the right values using the Unity Inspector on the libraries. In particular, I cannot seem to set the Embedded Linux ARM lib to ARM CPU without the Linux lib also changing to ARM CPU. Vice versa, changint the Linux lib to “Intel 64-bit” CPU also sets the Embedded Linux ARM lib to that CPU. Also, the windows DLL always seems to end up in Embedded Linux builds, no matter what settings I use. I tried in- and excluding different platforms for different libs, but still, changes to one lib seem to magically mess up changes I made to the other libs.

Please tell me how I can achive my goal, to have three native libs for different platforms and have Unity use the right one depending on which platform I build for.

[ad_2]

Previous article Steam’s Most-Hyped Zombie Game Is Out And Getting Trashed
Next article What’s Next For The Super Smash Bros. Series?
Hello there! My name is YoleeTeam, and I am thrilled to welcome you to AmazonianGames.com. As the premier destination for all things related to Amazon Games' universe, we are dedicated to providing you with the most exciting and immersive gaming experiences out there. From captivating visuals to exhilarating gameplay, our website is packed with comprehensive insights, updates, and reviews to keep you ahead of the game. Whether you're a seasoned gamer or new to the scene, I am here to guide you through this virtual frontier. If you have any questions or suggestions, feel free to reach out to me at john@yoleesolutions.com. Embark on your Amazon gaming journey today with AmazonianGames.com and let the adventure begin!