Navigation
API > API/Runtime > API/Runtime/AugmentedReality
ARComponent handles replication and visualization update for AR tracked geometries ARComponent is created in either multiplayer or local only environment
To customize the visualization logic, override 'UpdateVisualization' in Blueprint or 'UpdateVisualization_Implementation' in C++
To customize the replication logic, disable 'bUseDefaultReplication' and implement your own replication logic when the ARComponent is updated (see how 'Update' is implemented in the sub classes)
A MRMeshComponent will be created if mesh visualization is enabled (see UARSessionConfig::bGenerateMeshDataFromTrackedGeometry) It can be accessed via 'GetMRMesh' or 'UARTrackedGeometry::GetUnderlyingMesh'
| Name | UARComponent |
| Type | class |
| Header File | /Engine/Source/Runtime/AugmentedReality/Public/ARComponent.h |
| Include Path | #include "ARComponent.h" |
Syntax
UCLASS (MinimalAPI, Abstract, BlueprintType, Category="AR Gameplay")
class UARComponent : public USceneComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → USceneComponent → UARComponent
Implements Interfaces
Derived Classes
UARComponent derived class hierarchy
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UARComponent() |
ARComponent.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FMRMeshDelegate | TMulticastDelegate_OneParam< void, UMRMeshComponent * > | ARComponent.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| NativeID | FGuid | ARComponent.h |
|
|
| OnMRMeshCreated | FMRMeshDelegate | ARComponent.h | ||
| OnMRMeshDestroyed | FMRMeshDelegate | ARComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UMRMeshComponent * GetMRMesh() |
ARComponent.h |
|
|
void ReceiveRemove() |
Event when native representation is removed, called on server and clients. | ARComponent.h |
|
void SetNativeID
(
FGuid NativeID |
ARComponent.h |
|
|
void UpdateVisualization() |
ARComponent.h |
|
Public Virtual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Remove
(
UARTrackedGeometry* TrackedGeometry |
ARComponent.h | ||
virtual void Update
(
UARTrackedGeometry* TrackedGeometry |
ARComponent.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FLinearColor GetDebugColor() |
ARComponent.h | ||
void ManageMeshComponentForDebugMode
(
bool bDebugModeEnabled, |
ARComponent.h | ||
void RemoveMeshComponent
(
UARTrackedGeometry* TrackedGeometry |
ARComponent.h |
Protected Virtual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnRep_Payload() |
ARComponent.h | ||
virtual void OnUnregister() |
ARComponent.h |