Azure / azure-object-anchors

Azure Object Anchors releases and samples
https://docs.microsoft.com/azure/object-anchors
MIT License
36 stars 17 forks source link

Unable to import AzureObjectAnchors.SDK folder and some errors #20

Closed ananyanandi31 closed 2 years ago

ananyanandi31 commented 2 years ago

Description

Hi, I am trying to run the sample MRTK project on Hololens2. I updated the project to Unity 2020.3.21f1 version. Then, I added Azure Object Anchors feature using the MixedRealityFeatureTool and modified my Build settings to Universal Windows Platform. But I am facing some errors -

  1. "error CS0246: The type or namespace name 'EnvironmentObservationTopology' could not be found (are you missing a using directive or an assembly reference?)"
  2. "error CS0246: The type or namespace name 'EnvironmentObservation' could not be found (are you missing a using directive or an assembly reference?)"
  3. "error CS0246: The type or namespace name 'MultiAnchorObjectPlacement' could not be found (are you missing a using directive or an assembly reference?)"

Another unusual problem is that even after importing Azure Object Anchors from the MRFT, the AzureObjectAnchors.SDK folder is not visible in the Assets folder.

Expected behavior

No errors, so that the project can be built and run on a HoloLens 2 device.

Development information

AR Device information (please complete the following information):

craigktreasure commented 2 years ago

Appears to be a duplicate of #19.

blackbelt-violinist commented 2 years ago

Is it normal that the folder AzureObjectAnchors.SDK is not in github project?

craigktreasure commented 2 years ago

Yes. That comes into your project after you import the Azure Object Anchors UPM package using the Mixed Reality Feature Tool.

blackbelt-violinist commented 2 years ago

UPM package? I've tried getting just Azure Object Anchors and I've tried getting all features. When I get all features, I definitively get a AzureSpatialAnchors.SDK folder. When i get just Azure Object Anchors, I don't get the AzureObjectAnchors.SDK folder like in the tutorial

image

craigktreasure commented 2 years ago

I see the confusion. Expand the "packages" fielder and you'll see the Object Anchors SDK package contents. Object Anchors doesn't import anything into your "assets" folder, so you shouldn't see anything like that in there.

UPM is the Unity Package Manager. All the packages you installed are UPM packages.

blackbelt-violinist commented 2 years ago

Ok i got it to work. Apparently there is a piece of code that detects if the folder exist on build. It then generates the folder and then we can rebuild again on unity.

I think its missing a step in the tutorial.

Thanks for the help btw