| IModularFeature
|
Module |
|
Header |
/Engine/Plugins/Runtime/AR/AzureSpatialAnchors/Source/AzureSpatialAnchors/Public/IAzureSpatialAnchors.h |
Include |
#include "IAzureSpatialAnchors.h" |
class IAzureSpatialAnchors : public IModularFeature
IAzureSpatialAnchors.h provides the C++ interface for using AzureSpatialAnchors (ASA) in Unreal.
Most of its functions are simple wrappers for ASA api's from Microsoft. A few relate to UAzureCloudSpatialAnchor objects. A few communicate with the platform specific local anchor api's, where that is necessary.
It is extended by AzureSpatialAnchorsBase, which owns the UAzureCloudSpatialAnchor objects which are UE's representation of the ASA CloudAnchor object. That is then extended by AzureSpatialAnchorsFor<Platform> classes in their own plugins (so one can choose to enable the feature per platform). The ForPlatform classes implement the api wrapper functions and do whatever type conversions and async translation is required. AzureSpatialAnchorsForWMR is an example, however it is complicated by the existance of the interop layer (which keeps winrt types out of UE4's build). Other implementations may be somewhat simpler without this additional layer.
AzureSpatialAnchorsFunctionLibrary provides the blueprint api for AzureSpatialAnchors. It is also an example of how to use the C++ api.
UAzureSpatialAnchorsLibrary::StartSession() is a super simple case. It just calls through to one of the non-async ForPlatform api functions.
UAzureSpatialAnchorsLibrary::DeleteCloudAnchor is a latent blueprint function wrapping a simple async api function. Most of the logic is actually in FAzureSpatialAnchorsDeleteCloudAnchorAction.
UAzureSpatialAnchorsLibrary::LoadCloudAnchor / FAzureSpatialAnchorsLoadCloudAnchorAction is the most complicated. It creates a watcher then registers for the delegates so it can handle AnchorLocated and AnchorLocateCompleted events.
Name | Description | |
---|---|---|
|
~IAzureSpatialAnchors() |
Name |
Description |
|
---|---|---|
|
FASAAnchorLocatedTask |
If an implementation generates events from a thread other than the game thread it should launch these tasks that will fire the delegates on the game thread |
|
FASALocateAnchorsCompletedTask |
|
|
FASASessionUpdatedTask |
Name |
Description |
---|---|
Callback_Result |
|
Callback_Result_CloudAnchorID |
|
Callback_Result_SessionStatus |
|
Callback_Result_String |
|
CloudAnchorID |
|
FASAAnchorLocatedDelegate |
WatcherIdentifier, status, anchor. |
FASALocateAnchorsCompletedDelegate |
WatcherIdentifier, canceled. |
FASASessionUpdatedDelegate |
ReadyForCreateProgress, RecommendedForCreateProgress, SessionCreateHash, SessionLocateHash, feedback. |
LogFunctionPtr |
|
WatcherID |