MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.29k stars 21.48k forks source link

No definition for GetPlatformPointer #54436

Open jelmerS2 opened 4 years ago

jelmerS2 commented 4 years ago

Hi

From the code example: this.cloudSession.Session = aRSession.subsystem.nativePtr.GetPlatformPointer(); I get the error that GetPlatformPointer(); doesn't exist. Unity2019.2 What should it be?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

BharathNimmala-MSFT commented 4 years ago

@jelmerS2 Thank you for your query , our team will look into it and get back to you at the earliest.

asergaz commented 4 years ago

Thanks for the feedback! I have assigned the issue to the content author to evaluate and update as appropriate.

weinanshen commented 4 years ago

Hi @jelmerS2, the definition for GetPlatformPointer is here, https://github.com/Azure/azure-spatial-anchors-samples/blob/master/Unity/Assets/AzureSpatialAnchors.SDK/Scripts/SpatialAnchorExtensions.cs#L49, it's an extension method in SpatialAnchorExtensions.

rjtshrm commented 3 years ago

Any update on this. I am facing the same issue in UNity 2019.4.15.

asergaz commented 3 years ago

@RamonArguelles fyi. Thanks

msftradford commented 3 years ago

We have opened an internal ticket (#31481757) to make sure that we are more explicit about that function in this docs page. @asergaz please assign to me.

bonsenz commented 2 years ago

any updates on this? There is still an example in the documentation which does not work.

https://docs.microsoft.com/en-us/azure/spatial-anchors/how-tos/create-locate-anchors-unity

Set up the session

#if UNITY_ANDROID || UNITY_IOS
    this.cloudSession.Session = aRSession.subsystem.nativePtr.GetPlatformPointer();
#elif UNITY_WSA || WINDOWS_UWP
    // No need to set a native session pointer for HoloLens.
#else
    throw new NotSupportedException("The platform is not supported.");
#endif

    this.cloudSession.Start();

GetPlatformPointer() is not defined !

Varnauld commented 2 years ago

Hello - can you please reassign this to Pamistel? thank you!

Varnauld commented 2 years ago

I realize this issue is very old now - but wanted to leave a note here that we updated our tutorials in May - please let us know if these are helfpul, thank you

Tutorial: Create a new HoloLens Unity app - Azure Spatial Anchors | Microsoft Docs

microsoft/OpenXR-Unity-MixedReality-Samples: Sample Unity projects to demo how to use OpenXR plugin in Unity for HoloLens 2 and Mixed Reality headsets (github.com)