Using Native Plugins with VisionOS Builds

Can the team share any instructions for getting native plugins to work on VisionOS?

  • Are native plugins supported on visionOS?
  • what format do they need to be in? .bundle? .a?

My plugin is currently a macOS plugin. I’ve enabled visionOS in the targets checkboxes.
After building and installing to the simulator, I see the bundle file in the .app which ends up in the ReleaseForRunning Folder.

When starting the application I see

DllNotFoundException: Unable to load DLL 'hs-sdk-unity'. Tried the load the following dynamic libraries: Unable to load dynamic library '/hs-sdk-unity' because of 'Failed to open the requested dynamic library (0x06000000) dlerror() = dlopen(/hs-sdk-unity, 0x0005): tried: '/Users/horsman/Library/Developer/Xcode/DerivedData/Unity-visionOS-gahxeopoipjwuodcvpjzlepubzro/Build/Products/ReleaseForRunning-xrsimulator/hs-sdk-unity' (no such file), '/Library/Developer/CoreSimulator/Volumes/xrOS_21N5259j/Library/Developer/CoreSimulator/Profiles/Runtimes/xrOS 1.0.simruntime/Contents/Resources/RuntimeRoot/hs-sdk-unity' (no such file), '/hs-sdk-unity' (no such file)

Can someone verify the expected strategy for including a plugin?

I’ve gotten them to work using “__Internal” for lib name and .a files. I am on 2022.3.10 and my libiPhone-lib is a static .a lib, not sure what I’m seeing in your screenshot.

Follow the Unity instructions for building an iOS plugin instead of macOS.

This did not work for me.