SDK
What's New
iBeacon Bluetooth beacons will work on iOS.
Fixed a crash that could occur while discovering anchors.
Unity Remoting for HoloLens should now work when using Unity 2021.3 and the latest OpenXR plugin
Error behaviour of some CloudSpatialAnchor functions have changed from throwing an exception (on failure) to calling a user supplied function with information on the exception.
Updated signature of the following CloudSpatialAnchorSession functions:
CreateAnchorAsync(std::shared_ptr<::Microsoft::Azure::SpatialAnchors::CloudSpatialAnchor> const& anchor, std::function<void()> onComplete, std::function<void(std::exception_ptr)> onError)
DeleteAnchorAsync(std::shared_ptr<::Microsoft::Azure::SpatialAnchors::CloudSpatialAnchor> const& anchor, std::function<void()> onComplete, std::function<void(std::exception_ptr)> onError)
GetAccessTokenWithAccountKeyAsync(std::string const& accountKey, std::function<void(std::string)> onComplete, std::function<void(std::exception_ptr)> onError)
GetAccessTokenWithAuthenticationTokenAsync(std::string const& authenticationToken, std::function<void(std::string)> onComplete, std::function<void(std::exception_ptr)> onError)
GetAnchorPropertiesAsync(std::string const& identifier, std::function<void(std::shared_ptr<::Microsoft::Azure::SpatialAnchors::CloudSpatialAnchor>)> onComplete, std::function<void(std::exception_ptr)> onError)
GetCloudSpatialAnchorMapsAsync(std::function<void(std::vector<std::shared_ptr<::Microsoft::Azure::SpatialAnchors::CloudSpatialAnchorMap>>)> onComplete, std::function<void(std::exception_ptr)> onError)
GetNearbyAnchorIdsAsync(std::shared_ptr<::Microsoft::Azure::SpatialAnchors::NearDeviceCriteria> const& criteria, std::function<void(std::shared_ptr<IVectorstd::string>)> onComplete, std::function<void(std::exception_ptr)> onError)
GetSessionStatusAsync(std::function<void(std::shared_ptr<::Microsoft::Azure::SpatialAnchors::SessionStatus>)> onComplete, std::function<void(std::exception_ptr)> onError)
RefreshAnchorPropertiesAsync(std::shared_ptr<::Microsoft::Azure::SpatialAnchors::CloudSpatialAnchor> const& anchor, std::function<void()> onComplete, std::function<void(std::exception_ptr)> onError) -> void
UpdateAnchorPropertiesAsync(std::shared_ptr<::Microsoft::Azure::SpatialAnchors::CloudSpatialAnchor> const& anchor, std::function<void()> onComplete, std::function<void(std::exception_ptr)> onError)
Updated signature of the following CloudSpatialAnchorSessionDiagnostics functions:
CreateManifestAsync(std::string const& description, std::function<void(std::string)> onComplete, std::function<void(std::exception_ptr)> onError)
SubmitManifestAsync(std::string const& manifestPath, std::function<void()> onComplete, std::function<void(std::exception_ptr)> onError)
Updated signature of the following CloudSpatialAnchorWatcher function:
InformAnchorsNotNeeded(std::function<void()> onComplete, std::function<void(std::exception_ptr)> onError)
Samples have been updated to Unity 2021.3.
HoloLens Unity samples have been updated to use the OpenXR Plugin. Please install the latest version (>= 1.7.2) of the OpenXR Plugin through the MixedRealityFeature tool as you update the ASA packages to 2.14.
The legacy WindowsMR plugin will still work in previous versions of Unity.
Known Issues
iOS/Unity deploy target may need to be set to 12.0 instead of 11.0.
Raycasting in the iOS/Unity sample appears to treat planes as infinitely sized. As a consequence, tables and desks in a room may take priority over the floor when raycasting.
Non-Unity apps may run into error similar to the one below in areas where older signatures (for the above functions) are being used:
error: too few arguments to function call, expected 3, have 2
});
^
note: 'CreateAnchorAsync' declared here
APIGEN_LINKAGE auto CloudSpatialAnchorSession::CreateAnchorAsync(std::shared_ptr<::Microsoft::Azure::SpatialAnchors::CloudSpatialAnchor> const& param_anchor, std::function<void()> onComplete, std::function<void(std::exception_ptr)> onError) -> void
^
error: too few arguments to function call, expected 3, have 2
});
To resolve the above error, remove Status (if included) as argument for onComplete function and include onError function (with std::exception_ptr argument) as last argument of function. For example:
Replace:
CreateAnchorAsync(cloudAnchor, [this](Status status) {
...
});
With:
CreateAnchorAsync(cloudAnchor, this {
...
}, [this](std::exception_ptr ex) {
...
});