cancel
Showing results for 
Search instead for 
Did you mean: 

Existing dll not found in Editor when using OculusXR plugin

Tamulur
Explorer

When I use VR with Oculus as plugin provider and add the Azure Speech SDK, whenever I press Play in Editor and want to start the speech recognition, I get the error:

DllNotFoundException: Microsoft.CognitiveServices.Speech.core.dll assembly:<unknown assembly> type:<unknown type> member:(null)

This does not happen in the build, neither for Windows builds nor Quest standalone builds. The native dll in question, Microsoft.CognitiveServices.Speech.core (Azure Speech), is in the Plugins folder and correctly configured to also work in the Editor.

I traced it down somewhat: In the OculusXR package that gets installed when choosing the Oculus plugin, in OculusLoader.cs the Initialize() function is executed at start, and for some reason in this function the line

NativeMethods.SetUserDefinedSettings(userDefinedSettings);


causes the subsequent access to the Speech Core dll to fail. When I comment this line out, the dll is found.

Does anybody have an idea how a call to SetUserDefinedSettings can make subsequent access to a native dll to fail?

I have uploaded a simple test project that shows that problem: [link]. The test project has the Azure Speech SDK and the Azure speech test scene. To try it out, import the project, open the scene SpeechSDKSample/Scenes/SpeechRecognition, in the object SpeechManager in the SpeechRecognition component enter real or fake credentials for API key and region (the error occurs whether the credentials are real or not), press play in the editor, and click "Continues Recognition" in the game window. This is where the Azure speech SDK is trying to initialize and access the dll and where I get the error in the console (and failure to start the Speech recognition).

0 REPLIES 0