Azure / azure-spatial-anchors-samples

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

MBP 13 M1, Try open added ASA sample unity project failed #286

Closed AShtanev closed 3 years ago

AShtanev commented 3 years ago

Description

Can't add ASA sample project to Unity. After adding and trying to launch editor get this message: "The project you are opening contains compilation errors.

Entering Safe Mode allows you to resolve these errors without waiting for the rest of your project to import.

If you select Ignore (not recommended), your project will continue to import, but it may be in a broken or unusable state."

Try Unity versions 2020.3.15f2 and 2021.1.16f1 Try SDK Versions 2.9.0 and 2.10.2 OSX 11.5.1

At this point project opening is stopped

Снимок экрана 2021-08-15 в 15 25 33

And then a get this message

Снимок экрана 2021-08-15 в 15 30 57
oafolabi-msft commented 3 years ago

Hi @AShtanev , were you able to successfully follow the instructions on how to configure your project in unity? It looks like you may be missing some packages.

AShtanev commented 3 years ago

But how could I add packages to project before I open it? And if I try to open demo project in safe mode all required packages already in, because packages belong to project project. Or I miss something?

This is after open in safe mode.

Снимок экрана 2021-08-17 в 22 49 30 Снимок экрана 2021-08-17 в 22 49 26
oafolabi-msft commented 3 years ago

Hi @AShtanev, you can open the project in safe mode, follow the instructions I shared earlier to download the asa packages as tarballs, and then follow the instruction here to see how to add the packages as tarballs. Please let us know if this resolves your issue.

AShtanev commented 3 years ago

@oafolabi-msft, thank you for response. If you look to images I attached in previous message ( they are from ASA sample project opened in safe mode ) .tgz packages already added to Package Manager. I also try to add .tgz packages for android and windows ( which I don't need ) - no result, all errors the same in console

msftradford commented 3 years ago

Hi @AShtanev! The CloudSpatialAnchor object is a part of the platform-specific ASA SDK package. It looks like you have installed the ASA SDK for iOS, so you should be good there. Another thing to check would be the build platform. Can you confirm that you've selected the iOS platform from the Build Settings menu?

AShtanev commented 3 years ago

@msftradford, you are my savior! The problem was in target platform. When I download the project it was set to tvOS, after switching to iOS all compile errors gone. Tank you for response.

msftradford commented 3 years ago

That is great news! I'm going to go ahead and close this issue. Enjoy!