UAndroidXRSpatialAnchorsComponent

#include <AndroidXRSpatialAnchorsComponent.h>

The anchor component that can be added to create, destroy, and persist an anchor.

Summary

Inheritance

Inherits from: USceneComponent

Constructors and Destructors

UAndroidXRSpatialAnchorsComponent()

Public attributes

AnchorInfo {}
The associated anchor entity with this component.
OnAnchorPersistFailed {}
FAnchorPersistOperationFailedDelegate
The callback for when the persist operation associated with this component fails.
OnAnchorPersisted {}
FSpatialAnchorPersistedDelegate
The callback for when the anchor associated with this component is persisted.
OnAnchorUnpersistFailed {}
FAnchorPersistOperationFailedDelegate
The callback for when the unpersist operation fails.
OnAnchorUnpersisted {}
FSpatialAnchorPersistedDelegate
The callback for when the anchor associated with this component is unpersisted.
bUpdateComponentTransform {true}
bool
Whether to update the component transform with the tracked anchor's transform.

Public functions

BeginPlay() override
void
CreateAnchor()
bool
Create an anchor and associate it with this component.
DestroyAnchor()
bool
Destroys the anchor associated it with this component.
Initialize(UAndroidXRSpatialAnchorEntity *InAnchor)
void
Set the associated anchor entity for this component (for example, after loading persisted anchors)
IsValidAnchor() const
bool
Returns whether the component has an anchor associated with it.
PersistAnchor()
bool
Persist the anchor associated with this component.
TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override
void
UnpersistAnchor()
bool
Unpersist the anchor associated with this component.

Public attributes

AnchorInfo

UAndroidXRSpatialAnchorEntity * AnchorInfo {}

The associated anchor entity with this component.

This can be set through Initialize or will be set by calling CreateAnchor

OnAnchorPersistFailed

FAnchorPersistOperationFailedDelegate OnAnchorPersistFailed {}

The callback for when the persist operation associated with this component fails.

OnAnchorPersisted

FSpatialAnchorPersistedDelegate OnAnchorPersisted {}

The callback for when the anchor associated with this component is persisted.

OnAnchorUnpersistFailed

FAnchorPersistOperationFailedDelegate OnAnchorUnpersistFailed {}

The callback for when the unpersist operation fails.

OnAnchorUnpersisted

FSpatialAnchorPersistedDelegate OnAnchorUnpersisted {}

The callback for when the anchor associated with this component is unpersisted.

bUpdateComponentTransform

bool bUpdateComponentTransform {true}

Whether to update the component transform with the tracked anchor's transform.

Public functions

BeginPlay

void BeginPlay() override

CreateAnchor

bool CreateAnchor()

Create an anchor and associate it with this component.

Details
Returns
Whether the anchor was created

DestroyAnchor

bool DestroyAnchor()

Destroys the anchor associated it with this component.

Details
Returns
Whether the anchor was destroyed

Initialize

void Initialize(
  UAndroidXRSpatialAnchorEntity *InAnchor
)

Set the associated anchor entity for this component (for example, after loading persisted anchors)

IsValidAnchor

bool IsValidAnchor() const 

Returns whether the component has an anchor associated with it.

Details
Returns
Whether the component has an anchor associated with it

PersistAnchor

bool PersistAnchor()

Persist the anchor associated with this component.

TickComponent

void TickComponent(
  float DeltaTime,
  ELevelTick TickType,
  FActorComponentTickFunction *ThisTickFunction
) override

UAndroidXRSpatialAnchorsComponent

 UAndroidXRSpatialAnchorsComponent()

UnpersistAnchor

bool UnpersistAnchor()

Unpersist the anchor associated with this component.