![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <ARComponent.h>
Inheritance diagram for UARComponent:Public Member Functions | |
| UE_API | UARComponent () |
| UE_API void | SetNativeID (FGuid NativeID) |
| UMRMeshComponent * | GetMRMesh () |
| UE_API void | ReceiveRemove () |
| UE_API void | UpdateVisualization () |
| virtual void | Update (UARTrackedGeometry *TrackedGeometry) |
| virtual UE_API void | Remove (UARTrackedGeometry *TrackedGeometry) |
| DECLARE_MULTICAST_DELEGATE_OneParam (FMRMeshDelegate, UMRMeshComponent *) | |
Public Attributes | |
| FGuid | NativeID |
| FMRMeshDelegate | OnMRMeshCreated |
| FMRMeshDelegate | OnMRMeshDestroyed |
Protected Member Functions | |
| virtual UE_API void | OnUnregister () override |
| virtual UE_API void | OnRep_Payload () |
| UE_API void | RemoveMeshComponent (UARTrackedGeometry *TrackedGeometry) |
| UE_API void | ManageMeshComponentForDebugMode (bool bDebugModeEnabled, const FARSessionPayload &SessionPayload) |
| UE_API FLinearColor | GetDebugColor () const |
Protected Attributes | |
| bool | bUseDefaultReplication = true |
| TObjectPtr< UMaterialInterface > | DefaultMeshMaterial = nullptr |
| TObjectPtr< UMaterialInterface > | DefaultWireframeMeshMaterial = nullptr |
| TObjectPtr< UMRMeshComponent > | MRMeshComponent |
| TObjectPtr< UARTrackedGeometry > | MyTrackedGeometry |
| bool | bFirstUpdate = true |
| bool | bIsRemoved = false |
| bool | bInDebugMode = false |
| bool | bSavedWireframeMode |
| FLinearColor | SavedWireframeColor |
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'
| UARComponent::UARComponent | ( | ) |
| UARComponent::DECLARE_MULTICAST_DELEGATE_OneParam | ( | FMRMeshDelegate | , |
| UMRMeshComponent * | |||
| ) |
|
protected |
|
inline |
|
protected |
|
protectedvirtual |
|
overrideprotectedvirtual |
Event when native representation is removed, called on server and clients.
|
virtual |
|
protected |
|
inlinevirtual |
If 'ReceiveRemove' has been called for this component
|
protected |
If the default replication logic should be used for this component
|
protected |
The default material to be used for the generated mesh component. If not set, the DefaultMeshMaterial from ARSessionConfig will be used.
|
protected |
The default wireframe material to be used for the generated mesh component. If not set, the DefaultMeshMaterial from ARSessionConfig will be used.
|
protected |
|
protected |
The tracked geometry used for updating this component, only set on "local" client
| FGuid UARComponent::NativeID |
| FMRMeshDelegate UARComponent::OnMRMeshCreated |
| FMRMeshDelegate UARComponent::OnMRMeshDestroyed |
|
protected |