Azure / azure-spatial-anchors-samples

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

Unity - CreateSession and DestroySession #248

Closed Plaximo closed 3 years ago

Plaximo commented 3 years ago

We have an app where we can enable and disable AR. Also we are creating a session and destroying a session. But inside the SpatialAnchorManager.cs class the manager subscribes to the static event ARSession.stateChanged += ARSession_stateChanged; in CreateSessionAsync function and never unsubscribes from it.

So possible solution is to add ARSession.stateChanged -= ARSession_stateChanged; inside DestroySession.

Steps to reproduce the issue Call CreateSession Call DestroySession Call CreateSession

-> Now we are subscribed two times to ARSession.stateChanged

SDK Anchors 2.8.1 Unity 2020.2.1

oafolabi-msft commented 3 years ago

Hi @Plaximo , thanks for letting us know! We're looking into this (internal issue #32180757 ) and will update you with progress. Thanks!

msftradford commented 3 years ago

This has been fixed in the latest release of the ASA SDK