UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IARSystemSupport Class Referenceabstract

#include <ARSystem.h>

+ Inheritance diagram for IARSystemSupport:

Public Member Functions

virtual void OnARSystemInitialized ()
 
virtual bool OnStartARGameFrame (FWorldContext &WorldContext)
 
virtual EARTrackingQuality OnGetTrackingQuality () const =0
 
virtual EARTrackingQualityReason OnGetTrackingQualityReason () const =0
 
virtual void OnStartARSession (UARSessionConfig *SessionConfig)=0
 
virtual void OnPauseARSession ()=0
 
virtual void OnStopARSession ()=0
 
virtual FARSessionStatus OnGetARSessionStatus () const =0
 
virtual bool IsARAvailable () const =0
 
virtual void OnSetAlignmentTransform (const FTransform &InAlignmentTransform)=0
 
virtual TArray< FARTraceResultOnLineTraceTrackedObjects (const FVector2D ScreenCoord, EARLineTraceChannels TraceChannels)=0
 
virtual TArray< FARTraceResultOnLineTraceTrackedObjects (const FVector Start, const FVector End, EARLineTraceChannels TraceChannels)=0
 
virtual TArray< UARTrackedGeometry * > OnGetAllTrackedGeometries () const =0
 
virtual TArray< UARPin * > OnGetAllPins () const =0
 
virtual bool OnIsTrackingTypeSupported (EARSessionType SessionType) const =0
 
virtual bool OnToggleARCapture (const bool bOnOff, const EARCaptureType CaptureType)
 
virtual void OnSetEnabledXRCamera (bool bOnOff)
 
virtual FIntPoint OnResizeXRCamera (const FIntPoint &InSize)
 
virtual UARLightEstimateOnGetCurrentLightEstimate () const =0
 
virtual UARPinFindARPinByComponent (const USceneComponent *Component) const =0
 
virtual UARPinOnPinComponent (USceneComponent *ComponentToPin, const FTransform &PinToWorldTransform, UARTrackedGeometry *TrackedGeometry=nullptr, const FName DebugName=NAME_None)=0
 
virtual bool OnPinComponentToARPin (USceneComponent *ComponentToPin, UARPin *Pin)=0
 
virtual void OnRemovePin (UARPin *PinToRemove)=0
 
virtual bool OnTryGetOrCreatePinForNativeResource (void *InNativeResource, const FString &InPinName, UARPin *&OutPin)
 
virtual bool OnAddManualEnvironmentCaptureProbe (FVector Location, FVector Extent)=0
 
virtual TSharedPtr< FARGetCandidateObjectAsyncTask, ESPMode::ThreadSafeOnGetCandidateObject (FVector Location, FVector Extent) const =0
 
virtual TSharedPtr< FARSaveWorldAsyncTask, ESPMode::ThreadSafeOnSaveWorld () const =0
 
virtual EARWorldMappingState OnGetWorldMappingStatus () const =0
 
virtual TArray< FARVideoFormatOnGetSupportedVideoFormats (EARSessionType SessionType) const =0
 
virtual TArray< FVectorOnGetPointCloud () const =0
 
virtual bool OnAddRuntimeCandidateImage (UARSessionConfig *SessionConfig, UTexture2D *CandidateTexture, FString FriendlyName, float PhysicalWidth)=0
 
virtual voidGetARSessionRawPointer ()=0
 
virtual voidGetGameThreadARFrameRawPointer ()=0
 
virtual bool OnIsSessionTrackingFeatureSupported (EARSessionType SessionType, EARSessionTrackingFeature SessionTrackingFeature) const
 
virtual TArray< FARPose2DOnGetTracked2DPose () const
 
virtual bool OnIsSceneReconstructionSupported (EARSessionType SessionType, EARSceneReconstruction SceneReconstructionMethod) const
 
virtual bool OnAddTrackedPointWithName (const FTransform &WorldTransform, const FString &PointName, bool bDeletePointsWithSameName)
 
virtual int32 OnGetNumberOfTrackedFacesSupported () const
 
virtual UARTextureOnGetARTexture (EARTextureType TextureType) const
 
virtual ~IARSystemSupport ()
 
 DEFINE_AR_DELEGATE_ONE_PARAM (OnTrackableAdded, UARTrackedGeometry *)
 
 DEFINE_AR_DELEGATE_ONE_PARAM (OnTrackableUpdated, UARTrackedGeometry *)
 
 DEFINE_AR_DELEGATE_ONE_PARAM (OnTrackableRemoved, UARTrackedGeometry *)
 
virtual bool IsLocalPinSaveSupported () const
 
virtual bool ArePinsReadyToLoad ()
 
virtual void LoadARPins (TMap< FName, UARPin * > &LoadedPins)
 
virtual bool SaveARPin (FName InName, UARPin *InPin)
 
virtual void RemoveSavedARPin (FName InName)
 
virtual void RemoveAllSavedARPins ()
 
virtual bool OnGetCameraIntrinsics (FARCameraIntrinsics &OutCameraIntrinsics) const
 

Detailed Description

Implement IARSystemSupport for any platform that wants to be an Unreal Augmented Reality System. e.g. AppleARKit, GoogleARCore. This interface is included as part of the abstract class FARSupportInterface . The functions you must override are coalesced here for clarity.

Augmented Reality Spaces

Engineers working on supporting Augmented Reality must be aware of three spaces:

TrackingSpace : This is the space defined by the underlying AR system (e.g. ARKit, ARCore, etc.) Unreal has no control over the origin of this space.

AlignedTrackingSpace : To regain control of TrackingSpace, Unreal applies the AlignmentTransform so bend TrackingSpace to its will. If you are implementing IARSystemSupport, you will need to understand this transform and apply it accordingly.

WorldSpace : This is Unreal's coordinate system. Coordinates from Tracking Space can be translated into WorldSpace by using the AlignmentTransform and the TrackingToWorldTransform.

* [TrackingSpace]--(AlignmentTransform)-->[AlignedTrackingSpace]--(TrackingToWorld)-->[WorldSpace]
* 

Constructor & Destructor Documentation

◆ ~IARSystemSupport()

virtual IARSystemSupport::~IARSystemSupport ( )
inlinevirtual

Member Function Documentation

◆ ArePinsReadyToLoad()

virtual bool IARSystemSupport::ArePinsReadyToLoad ( )
inlinevirtual

◆ DEFINE_AR_DELEGATE_ONE_PARAM() [1/3]

IARSystemSupport::DEFINE_AR_DELEGATE_ONE_PARAM ( OnTrackableAdded  ,
UARTrackedGeometry  
)

Delegate called when an ar item is added to the scene

Parameters
Addedthe item that was added

◆ DEFINE_AR_DELEGATE_ONE_PARAM() [2/3]

IARSystemSupport::DEFINE_AR_DELEGATE_ONE_PARAM ( OnTrackableRemoved  ,
UARTrackedGeometry  
)

Delegate called when an ar item is removed from the scene

Parameters
Removedthe item that was removed

◆ DEFINE_AR_DELEGATE_ONE_PARAM() [3/3]

IARSystemSupport::DEFINE_AR_DELEGATE_ONE_PARAM ( OnTrackableUpdated  ,
UARTrackedGeometry  
)

Delegate called when an ar item is updated

Parameters
Updatedthe item that was updated

◆ FindARPinByComponent()

virtual UARPin * IARSystemSupport::FindARPinByComponent ( const USceneComponent *  Component) const
pure virtual

Given a scene component find the ARPin which it is pinned by, if any.

◆ GetARSessionRawPointer()

virtual void * IARSystemSupport::GetARSessionRawPointer ( )
pure virtual

◆ GetGameThreadARFrameRawPointer()

virtual void * IARSystemSupport::GetGameThreadARFrameRawPointer ( )
pure virtual

◆ IsARAvailable()

virtual bool IARSystemSupport::IsARAvailable ( ) const
pure virtual

Returns true/false based on whether AR features are available

◆ IsLocalPinSaveSupported()

virtual bool IARSystemSupport::IsLocalPinSaveSupported ( ) const
inlinevirtual

◆ LoadARPins()

virtual void IARSystemSupport::LoadARPins ( TMap< FName, UARPin * > &  LoadedPins)
inlinevirtual

◆ OnAddManualEnvironmentCaptureProbe()

virtual bool IARSystemSupport::OnAddManualEnvironmentCaptureProbe ( FVector  Location,
FVector  Extent 
)
pure virtual

Tells the ARSystem to generate a capture probe at the specified location if supported

◆ OnAddRuntimeCandidateImage()

virtual bool IARSystemSupport::OnAddRuntimeCandidateImage ( UARSessionConfig SessionConfig,
UTexture2D CandidateTexture,
FString  FriendlyName,
float  PhysicalWidth 
)
pure virtual

Add candidate image at runtime

Returns
True if it added the iamge successfully

◆ OnAddTrackedPointWithName()

virtual bool IARSystemSupport::OnAddTrackedPointWithName ( const FTransform WorldTransform,
const FString &  PointName,
bool  bDeletePointsWithSameName 
)
inlinevirtual

◆ OnARSystemInitialized()

virtual void IARSystemSupport::OnARSystemInitialized ( )
inlinevirtual

Invoked after the base AR system has been initialized.

◆ OnGetAllPins()

virtual TArray< UARPin * > IARSystemSupport::OnGetAllPins ( ) const
pure virtual
Returns
a TArray of all the pins that attach components to TrackedGeometries

◆ OnGetAllTrackedGeometries()

virtual TArray< UARTrackedGeometry * > IARSystemSupport::OnGetAllTrackedGeometries ( ) const
pure virtual
Returns
a TArray of all the tracked geometries known to your ar system

◆ OnGetARSessionStatus()

virtual FARSessionStatus IARSystemSupport::OnGetARSessionStatus ( ) const
pure virtual
Returns
the info about whether the session is running normally or encountered some kind of error.

◆ OnGetARTexture()

virtual UARTexture * IARSystemSupport::OnGetARTexture ( EARTextureType  TextureType) const
inlinevirtual
Returns
the AR texture for the specified type

◆ OnGetCameraIntrinsics()

virtual bool IARSystemSupport::OnGetCameraIntrinsics ( FARCameraIntrinsics OutCameraIntrinsics) const
inlinevirtual

◆ OnGetCandidateObject()

virtual TSharedPtr< FARGetCandidateObjectAsyncTask, ESPMode::ThreadSafe > IARSystemSupport::OnGetCandidateObject ( FVector  Location,
FVector  Extent 
) const
pure virtual

Generates a UARCandidateObject from the point cloud data within the location and its extent using an async task

◆ OnGetCurrentLightEstimate()

virtual UARLightEstimate * IARSystemSupport::OnGetCurrentLightEstimate ( ) const
pure virtual
Returns
the best available light estimate; nullptr if light estimation is inactive or not available

◆ OnGetNumberOfTrackedFacesSupported()

virtual int32 IARSystemSupport::OnGetNumberOfTrackedFacesSupported ( ) const
inlinevirtual
Returns
the max number of faces can be tracked at the same time

◆ OnGetPointCloud()

virtual TArray< FVector > IARSystemSupport::OnGetPointCloud ( ) const
pure virtual
Returns
the current point cloud data for the ar scene

◆ OnGetSupportedVideoFormats()

virtual TArray< FARVideoFormat > IARSystemSupport::OnGetSupportedVideoFormats ( EARSessionType  SessionType) const
pure virtual
Returns
The list of supported video formats for this device and session type

◆ OnGetTracked2DPose()

virtual TArray< FARPose2D > IARSystemSupport::OnGetTracked2DPose ( ) const
inlinevirtual
Returns
all the tracked 2D poses in AR

◆ OnGetTrackingQuality()

virtual EARTrackingQuality IARSystemSupport::OnGetTrackingQuality ( ) const
pure virtual
Returns
the tracking quality; if unable to determine tracking quality, return EARTrackingQuality::NotAvailable

◆ OnGetTrackingQualityReason()

virtual EARTrackingQualityReason IARSystemSupport::OnGetTrackingQualityReason ( ) const
pure virtual
Returns
the reason of limited tracking quality; if the state is not limited, return EARTrackingQualityReason::None

◆ OnGetWorldMappingStatus()

virtual EARWorldMappingState IARSystemSupport::OnGetWorldMappingStatus ( ) const
pure virtual
Returns
the current mapping status

◆ OnIsSceneReconstructionSupported()

virtual bool IARSystemSupport::OnIsSceneReconstructionSupported ( EARSessionType  SessionType,
EARSceneReconstruction  SceneReconstructionMethod 
) const
inlinevirtual
Returns
the required scene construction method is supported

◆ OnIsSessionTrackingFeatureSupported()

virtual bool IARSystemSupport::OnIsSessionTrackingFeatureSupported ( EARSessionType  SessionType,
EARSessionTrackingFeature  SessionTrackingFeature 
) const
inlinevirtual
Returns
if a particular session feature is supported on this device

◆ OnIsTrackingTypeSupported()

virtual bool IARSystemSupport::OnIsTrackingTypeSupported ( EARSessionType  SessionType) const
pure virtual
Returns
whether the specified tracking type is supported by this device

◆ OnLineTraceTrackedObjects() [1/2]

virtual TArray< FARTraceResult > IARSystemSupport::OnLineTraceTrackedObjects ( const FVector  Start,
const FVector  End,
EARLineTraceChannels  TraceChannels 
)
pure virtual

◆ OnLineTraceTrackedObjects() [2/2]

virtual TArray< FARTraceResult > IARSystemSupport::OnLineTraceTrackedObjects ( const FVector2D  ScreenCoord,
EARLineTraceChannels  TraceChannels 
)
pure virtual

Trace all the tracked geometries and determine which have been hit by a ray cast from ScreenCoord. Only geometries specified in TraceChannels are considered.

Returns
a list of all the geometries that were hit, sorted by distance

◆ OnPauseARSession()

virtual void IARSystemSupport::OnPauseARSession ( )
pure virtual

Stop the AR system but leave its internal state intact.

◆ OnPinComponent()

virtual UARPin * IARSystemSupport::OnPinComponent ( USceneComponent *  ComponentToPin,
const FTransform PinToWorldTransform,
UARTrackedGeometry TrackedGeometry = nullptr,
const FName  DebugName = NAME_None 
)
pure virtual

Pin an Unreal Component to a location in the world. Optionally, associate with a TrackedGeometry to receive transform updates that effectively attach the component to the geometry.

Returns
the UARPin object that is pinning the component to the world and (optionally) a TrackedGeometry

◆ OnPinComponentToARPin()

virtual bool IARSystemSupport::OnPinComponentToARPin ( USceneComponent *  ComponentToPin,
UARPin Pin 
)
pure virtual

Pin a component to an existing ARPin.
If the component is alreayd pinned it will first be removed from that pin, which will be left empty. If the target Pin is already in use the component previously pinned to it will be unpinned.

Returns
true if the operation was successful

Implemented in FARSystemSupportBase.

◆ OnRemovePin()

virtual void IARSystemSupport::OnRemovePin ( UARPin PinToRemove)
pure virtual

Given a pin, remove it and stop updating the associated component based on the tracked geometry. The component in question will continue to track with the world, but will not get updates specific to a TrackedGeometry.

◆ OnResizeXRCamera()

virtual FIntPoint IARSystemSupport::OnResizeXRCamera ( const FIntPoint InSize)
inlinevirtual

◆ OnSaveWorld()

virtual TSharedPtr< FARSaveWorldAsyncTask, ESPMode::ThreadSafe > IARSystemSupport::OnSaveWorld ( ) const
pure virtual

Saves the AR world to a byte array using an async task

◆ OnSetAlignmentTransform()

virtual void IARSystemSupport::OnSetAlignmentTransform ( const FTransform InAlignmentTransform)
pure virtual

Set a transform that will align the Tracking Space origin to the World Space origin. This is useful for supporting static geometry and static lighting in AR. Note: Usually, an app will ask the user to select an appropriate location for some experience. This allows us to choose an appropriate alignment transform.

◆ OnSetEnabledXRCamera()

virtual void IARSystemSupport::OnSetEnabledXRCamera ( bool  bOnOff)
inlinevirtual

◆ OnStartARGameFrame()

virtual bool IARSystemSupport::OnStartARGameFrame ( FWorldContext WorldContext)
inlinevirtual

◆ OnStartARSession()

virtual void IARSystemSupport::OnStartARSession ( UARSessionConfig SessionConfig)
pure virtual

Start the AR system.

Parameters
SessionTypeThe type of AR session to create
Returns
true if the system was successfully started

◆ OnStopARSession()

virtual void IARSystemSupport::OnStopARSession ( )
pure virtual

Stop the AR system and reset its internal state; this task must succeed.

◆ OnToggleARCapture()

virtual bool IARSystemSupport::OnToggleARCapture ( const bool  bOnOff,
const EARCaptureType  CaptureType 
)
inlinevirtual

◆ OnTryGetOrCreatePinForNativeResource()

virtual bool IARSystemSupport::OnTryGetOrCreatePinForNativeResource ( void InNativeResource,
const FString &  InPinName,
UARPin *&  OutPin 
)
inlinevirtual

Given the platform specific native resource for a pin, create a pin.

Returns
true when a pin is successfully created, otherwise false

◆ RemoveAllSavedARPins()

virtual void IARSystemSupport::RemoveAllSavedARPins ( )
inlinevirtual

◆ RemoveSavedARPin()

virtual void IARSystemSupport::RemoveSavedARPin ( FName  InName)
inlinevirtual

◆ SaveARPin()

virtual bool IARSystemSupport::SaveARPin ( FName  InName,
UARPin InPin 
)
inlinevirtual

The documentation for this class was generated from the following file: