Missing dlls in OSX standalone IL2CPP builds?

Using Cesium for Unity 1.6.1
Unity Editor 2023.1.12
Apple Silicon (M2)

I’ve tried building (IL2CPP) from the cesium-unity-samples project (02_CesiumMelbourne scene) as well as a test project that is just an empty scene plus the CesiumGeoreference.

In each case the editor works perfectly fine, but nothing renders when I make standalone builds for apple silicon. In the player logs, I see errors that say that the CesiumForUnityNative-Runtime dll could not be found.

Is there some step I may be missing when making standalone builds? I don’t seem to be able to modify the settings on the plugin dlls.

Here’s the error:
DllNotFoundException: Unable to load DLL ‘CesiumForUnityNative-Runtime’. Tried the load the following dynamic libraries: Unable to load dynamic library ‘CesiumForUnityNative-Runtime’ because of 'Failed to open the requested dynamic library (0x06000000) dlerror() = dlopen(CesiumForUnityNative-Runtime, 0x0005): tried: ‘CesiumForUnityNative-Runtime’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OSCesiumForUnityNative-Runtime’ (no such file), ‘/usr/lib/CesiumForUnityNative-Runtime’ (no such file, not in dyld cache), ‘CesiumForUnityNative-Runtime’ (no such file), ‘/usr/local/lib/CesiumForUnityNative-Runtime’ (no such file), ‘/usr/lib/CesiumForUnityNative-Runtime’ (no such file, not in dyld cache)

Thanks!

I was able to get this to work by manually adding libCesiumForUnityNative-Runtime.dylib (located at Cesium for Unity/Plugins/Standalone/) to my build’s plugins. According to the inspector, it’s only set to Intel 64-bit, and I assume that’s why it isn’t being included in Apple silicon builds

We just merged a PR to fix this:

It will be available in the next release (early October).

Newbie question… how to I add the runtime manually to get round this issue?

We’ve now released an official version that includes this change. So you should be able to simply update to Cesium for Unity v1.6.2 using the Unity Package Manager.

Brilliant, v1.6.2 works perfectly, many thanks :+1: