Azure / azure-spatial-anchors-samples

Azure Spatial Anchors sample code
Other
293 stars 139 forks source link

error CS4008: Cannot await 'void' #260

Closed GuoweiST closed 3 years ago

GuoweiST commented 3 years ago

After importing this into a fresh Unity Poject, Unity shows the below error: Assets\AzureSpatialAnchors.Examples\Scripts\DemoScriptBase.cs(445,17): error CS4008: Cannot await 'void'

I was following the steps provided here

Currently using Unity 2019.4.21f1 LTS.

willyeo commented 3 years ago

I suspect while you're using ver 2.9.0 samples project here, but downloaded old ASA packages. Please follow this download section again with the matching version (2.9.0).

GuoweiST commented 3 years ago

Hi thanks for the reply. I can't seems to find version 2.9.0 but able to get dismiss the error with 2.10.0-preview.1. Thanks for your help!

GuoweiST commented 3 years ago

Hi sorry but I faced another issue. I am currently stuck at the "Deploy the HoloLens application" step.

When I click on Start Debugging on VS, it loads the app on my Hololens 2 but I am not able to see the UI on the "AnchorsDemoLauncher" scene. I tried deploying the build and run it on the Hololens itself but still face the same issue.

willyeo commented 3 years ago

Is the scene checked in the Build Settings? image

Also, version mismatch might cause issues later. Looks like "Download with web browser" has a problem now and only shows 2.10.0-preview.1 as you mentioned. While this waits for the fix, please try with "Download with NPM" approach to get the correct version.

GuoweiST commented 3 years ago

Yes all the scene are checked.

After changing the SDK to 2.9.0, I am still facing the same issue.

But when I tried to make a new build and start debugging, VS prompted me a that WindowsMRXRSDK.pdb not loaded. image

willyeo commented 3 years ago

Because this is different issue than the original post (Cannot await 'void'), could you close this issue and open a new one? In the new issue, please include more information - Unity version, your device (HL 1 or 2?), OS version for the HoloLens, ASA SDK version (I assume it's 2.9.0).