Start a new topic
Answered

Unable to run samples with Spaces SDK v0.23.0

I attempted to run a sample scene using Spaces SDK v0.23.0.


As I don't have the physical device yet, I tried to run it in the Unity Editor.


However, I encountered the same issue described in the following topic:


https://support.spaces.qualcomm.com/support/discussions/topics/72000788465


This issue occurs with all sample scenes.

I'm using Unity 2021.3.41f1, but the issue also persists with 2021.3.16f1.


I've also tried the steps outlined in the FAQ at the URL below, but the DllNotFoundException continues to occur:


https://support.spaces.qualcomm.com/support/solutions/articles/72000606256-testing-snapdragon-spaces-apps-within-the-unity-editor


Can anyone provide guidance on how to successfully run these samples in the Unity Editor?


Best Answer

I could not reproduce your issue. Could you please specify the following:

  • Detailed steps to reproduce if possible
  • What is your startup scene
  • Did you import the additional QCHT package? 
  • Is the default device pointer working for you when pressing play?
  • Could you please give me the full error of the DllNotFoundException?


The default setup in edtior should allow you to test using the device pointer like in the picture below.

There are some warnings expected to happen see below. These are completely normal and do not interfere with the application:


Again, you can not test perception features such as Anchors, Camera Frame Access etc. The only things you can test in the editor are UI navigation, XR Interaction Toolkit, QCHT (if included in the project).


Snapdragon Spaces does not run on Windows or Mac standalone. It is not possible to fully test all perception features in the editor without having a physical device. The FAQ you linked  https://support.spaces.qualcomm.com/support/solutions/articles/72000606256-testing-snapdragon-spaces-apps-within-the-unity-editor is about testing XR Interaction Toolkit and Hand Tracking in the editor which does work. Other perception features such as Plane Detection, Anchors etc. are not working in the editor. 


If you encounter the same dll problem as in this thread the build target was not set to Android and is still on Windows. Please go into the build settings and set the build target to Android by selecting the Android tab then clicking on Switch Platform.



I apologize for the lack of information in my previous post.


To clarify, I have set the Platform in Build Settings to Android.

However, I'm still encountering the DllNotFoundException.


How can I successfully run these samples in the Unity editor?

Answer

I could not reproduce your issue. Could you please specify the following:

  • Detailed steps to reproduce if possible
  • What is your startup scene
  • Did you import the additional QCHT package? 
  • Is the default device pointer working for you when pressing play?
  • Could you please give me the full error of the DllNotFoundException?


The default setup in edtior should allow you to test using the device pointer like in the picture below.

There are some warnings expected to happen see below. These are completely normal and do not interfere with the application:


Again, you can not test perception features such as Anchors, Camera Frame Access etc. The only things you can test in the editor are UI navigation, XR Interaction Toolkit, QCHT (if included in the project).

> Detailed steps to reproduce if possible


The steps are very simple. I just followed the instructions at this link:


https://docs.spaces.qualcomm.com/unity/setup/setup-guide


> What is your startup scene


MainMenu.unity


> Did you import the additional QCHT package?


No, I didn't import it.


> Is the default device pointer working for you when pressing play?


It's not working. The scene itself is paused due to errors.


> Could you please give me the full error of the DllNotFoundException?


Here are the details of the error:


```

DllNotFoundException: InterceptOpenXR assembly:<unknown assembly> type:<unknown type> member:(null)

Qualcomm.Snapdragon.Spaces.BaseRuntimeFeature.IsPassthroughSupported () (at Library/PackageCache/com.qualcomm.snapdragon.spaces@899b23221947/Runtime/Core/BaseRuntimeFeature.InterceptEnvironmentBlendMode.cs:50)

Qualcomm.Snapdragon.Spaces.Samples.SampleController.Start () (at Assets/Samples/Snapdragon Spaces/0.23.0/Core Samples/Shared Assets/Scripts/Samples/SampleController.cs:57)

Qualcomm.Snapdragon.Spaces.Samples.MainMenuSampleController.Start () (at Assets/Samples/Snapdragon Spaces/0.23.0/Core Samples/Scenes/Main Menu/Scripts/MainMenuSampleController.cs:29)

```


```

Only one OpenXR feature may have a custom runtime loader per platform. Disable Mock Runtime or Base Runtime.

UnityEditor.EditorApplication:Internal_CallUpdateFunctions () (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorApplication.cs:358)

```


--------


I'd like to provide my development environment details again:


* Unity 2021.3.41f1

* Spaces SDK v0.23.0 

* macOS Sonoma 14.3.1


For detailed Unity Editor settings, please refer to the screenshots I've provided.

image

image

image

image

image

Could you please check the enabled OpenXR features in the Editor? 

I belive you have the Meta Quest Mock runtime enabled causing one of the errors. Try copying my settings please where Base Runtime is enabled and Mock Runtime disabled:

The default Spaces Samples to my knowledge do not support the XR Interaction Toolkit Simulator (the QCHT samples do). Please disable it again. 


Could you please send a screenshot of which OpenXR features you have enabled? 


Other suggestions:

  • Try deleting your library folder to avoid a potential package caching bug
  • Reimport the Snapdragon Spaces Plugin and Samples in the Package Manager


You have marked this thread as answered, based on your response the issue doesn't seem resolved. Please indicate if you are still seeing the issue.

Apologies, but the issue is still ongoing.


> I believe you have the Meta Quest Mock runtime enabled causing one of the errors.


It has been disabled from the beginning.


> Try copying my settings please where Base Runtime is enabled and Mock Runtime disabled:


I have disabled the Mock Runtime.


> The default Spaces Samples to my knowledge do not support the XR Interaction Toolkit Simulator (the QCHT samples do). Please disable it again.


When I look at the Spaces package settings, XRI is included in the dependencies. What does this mean?


Regardless, I have disabled "Use XR Device Simulator in scenes" in Project Settings > XR Plug-in Management.


```

"com.qualcomm.snapdragon.spaces": {

    "version": "file:/Users/tnagura/Developer/git/SDS/Snapdragon_Spaces_SDK_0_23_0_for_Unity/Unity Package/com.qualcomm.snapdragon.spaces-0.23.0.tgz",

    "depth": 0,

    "source": "local-tarball",

    "dependencies": {

        "com.unity.xr.openxr": "1.8.2",

        "com.unity.xr.arfoundation": "4.2.7",

        "com.unity.xr.interaction.toolkit": "2.3.2"

    }

},

```


> Try deleting your library folder to avoid a potential package caching bug

> Reimport the Snapdragon Spaces Plugin and Samples in the Package Manager


I have disabled both "Mock Runtime" and "Use XR Device Simulator in scenes", cleared the library cache, and reimported the packages. I also reimported the samples.


However, the result remains unchanged. Please provide a solution.


Note: Screenshots of all the settings mentioned above have been attached.

image

image

image

image

It looks like the second error about the Mock Runtime is gone. I wasn't asking you to disable the XR Interaction Toolkit plugin but only the simulator. Your changes were what I intended to test. 


The dll error you are seeing should not be there in 0.23.0. The functionality was migrated from using a custom library (lib intercept) to a Unity OpenXR based one. https://docs.spaces.qualcomm.com/unity/about/changelog#changed 

Your code seems like it's trying to call this library that was removed in the 0.23.0 release. Is this a project that you updated from a previous version of Snapdragon Spaces? 

Could you please send a list of packages and their versions included in the project? (or a screenshot from the Package Manager).

When you say "clear the library cache" does that mean you deleted and regenerated the projects Library folder entirely? 

> Your code seems like it's trying to call this library that was removed in the 0.23.0 release. Is this a project that you updated from a previous version of Snapdragon Spaces?


No. This is a new project created following the instructions at the URL below:


https://docs.spaces.qualcomm.com/unity/setup/setup-guide


> When you say "clear the library cache" does that mean you deleted and regenerated the projects Library folder entirely?


Yes, that's correct.


> Could you please send a list of packages and their versions included in the project? (or a screenshot from the Package Manager).


I'm attaching a zip file of the project with the library folder deleted.


(Please modify the path for `com.qualcomm.snapdragon.spaces-0.23.0.tgz` in the manifest.json file)

zip
(3.37 MB)

> Your code seems like it's trying to call this library that was removed in the 0.23.0 release. Is this a project that you updated from a previous version of Snapdragon Spaces?


No. This is a new project created following the instructions at the URL below:


https://docs.spaces.qualcomm.com/unity/setup/setup-guide


> When you say "clear the library cache" does that mean you deleted and regenerated the projects Library folder entirely?


Yes, that's correct.


> Could you please send a list of packages and their versions included in the project? (or a screenshot from the Package Manager).


I'm attaching a zip file of the project with the library folder deleted.


(Please modify the path for `com.qualcomm.snapdragon.spaces-0.23.0.tgz` in the manifest.json file)

zip
(3.37 MB)

I posted a reply last week, but it's not showing up in this topic.

(It's possible that by the time this post appears, last week's post might have shown up as well...)

I had attached a zip file containing a compressed folder of my Unity project.

Could this be the reason why my post isn't being displayed?

Some posts on this forum are flagged as potential spam and need manual review as a result of that. 

Thanks for providing the sample project, I'll be investigating it. 

It looks like your project is running with a Unity version that per default uses the OpenXR plugin 1.11.0 - which is not compatible with Snapdragon Spaces. You can change the dependency in the manifest.json file in the Packages folder of your project. Please set it to 1.8.2. 

    "com.unity.xr.openxr": "1.8.2",


In the best case use Unity 2021.3.16 which is the recommended Unity version at the moment to avoid running into unintended side effects caused by editor dependencies. 


Please also check the Base Runtime Feature for Standalone in the OpenXR Settings.



Login to post a comment