UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ARSessionConfig.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6#include "UObject/Object.h"
7#include "ARTrackable.h"
8#include "ARComponent.h"
9#include "Engine/DataAsset.h"
10
11#include "ARSessionConfig.generated.h"
12
13#define UE_API AUGMENTEDREALITY_API
14
16
18UENUM(BlueprintType, Category="AR AugmentedReality", meta=(Experimental))
20{
22 Gravity,
23
29
31 Camera
32};
33
35UENUM(BlueprintType, Category = "AR AugmentedReality", meta = (Experimental))
37{
39 None,
40
43
45 World,
46
48 Face,
49
51 Image,
52
55
58
61};
62
64UENUM(BlueprintType, Category = "AR AugmentedReality", meta = (Experimental, Bitflags))
66{
68 None = 0,
69
70 /* Detects horizontal, flat surfaces. */
72
73 /* Detects vertical, flat surfaces. */
75};
77
79UENUM(BlueprintType, Category = "AR AugmentedReality", meta = (Experimental))
94
96UENUM(BlueprintType, Category = "AR AugmentedReality", meta = (Experimental))
105
109UENUM(BlueprintType)
111{
113 None,
114
116 Manual,
117
120};
121
126UENUM(BlueprintType)
135
140UENUM(BlueprintType)
161
165UENUM(BlueprintType)
167{
169 None,
170
172 MeshOnly,
173
176};
177
181UCLASS(MinimalAPI, BlueprintType, Category="AR Settings")
183{
185
186public:
189
190public:
192 UFUNCTION(BlueprintCallable, Category = "AR Settings")
193 UE_API EARWorldAlignment GetWorldAlignment() const;
194
196 UFUNCTION(BlueprintCallable, Category = "AR Settings")
197 UE_API EARSessionType GetSessionType() const;
198
200 UFUNCTION(BlueprintCallable, Category = "AR Settings")
201 UE_API EARPlaneDetectionMode GetPlaneDetectionMode() const;
202
204 UFUNCTION(BlueprintCallable, Category = "AR Settings")
205 UE_API EARLightEstimationMode GetLightEstimationMode() const;
206
208 UFUNCTION(BlueprintCallable, Category = "AR Settings")
209 UE_API EARFrameSyncMode GetFrameSyncMode() const;
210
212 UFUNCTION(BlueprintCallable, Category = "AR Settings")
213 UE_API bool ShouldRenderCameraOverlay() const;
214
216 UFUNCTION(BlueprintCallable, Category = "AR Settings")
217 UE_API bool ShouldEnableCameraTracking() const;
218
220 UFUNCTION(BlueprintCallable, Category = "AR Settings")
221 UE_API bool ShouldEnableAutoFocus() const;
222
224 UFUNCTION(BlueprintCallable, Category = "AR Settings")
225 UE_API void SetEnableAutoFocus(bool bNewValue);
226
228 UFUNCTION(BlueprintCallable, Category = "AR Settings")
229 UE_API bool ShouldResetCameraTracking() const;
230
232 UFUNCTION(BlueprintCallable, Category = "AR Settings")
233 UE_API void SetResetCameraTracking(bool bNewValue);
234
236 UFUNCTION(BlueprintCallable, Category = "AR Settings")
237 UE_API bool ShouldResetTrackedObjects() const;
238
240 UFUNCTION(BlueprintCallable, Category = "AR Settings")
241 UE_API void SetResetTrackedObjects(bool bNewValue);
242
244 UFUNCTION(BlueprintCallable, Category = "AR Settings")
245 UE_API const TArray<UARCandidateImage*>& GetCandidateImageList() const;
246
247 // Add a new CandidateImage to the ARSessionConfig.
248 UFUNCTION(BlueprintCallable, Category = "AR Settings")
249 UE_API void AddCandidateImage(UARCandidateImage* NewCandidateImage);
250
251 // Remove a candidate image from the ARSessionConfig, by pointer, note the image object must match, not the content of the image.
252 UFUNCTION(BlueprintCallable, Category = "AR Settings")
253 UE_API void RemoveCandidateImage(UARCandidateImage* CandidateImage);
254
255 // Remove a candidate image from the ARSessionConfig, by index.
256 UFUNCTION(BlueprintCallable, Category = "AR Settings")
257 UE_API void RemoveCandidateImageAtIndex(int Index);
258
259 // Remove all candidate images from the ARSessionConfig
260 UFUNCTION(BlueprintCallable, Category = "AR Settings")
261 UE_API void ClearCandidateImages();
262
264 UFUNCTION(BlueprintCallable, Category = "AR Settings")
265 UE_API int32 GetMaxNumSimultaneousImagesTracked() const;
266
268 UFUNCTION(BlueprintCallable, Category = "AR Settings")
269 UE_API EAREnvironmentCaptureProbeType GetEnvironmentCaptureProbeType() const;
270
272 UFUNCTION(BlueprintCallable, Category = "AR Settings")
273 UE_API const TArray<uint8>& GetWorldMapData() const;
275 UFUNCTION(BlueprintCallable, Category = "AR Settings")
276 UE_API void SetWorldMapData(TArray<uint8> WorldMapData);
277
279 UFUNCTION(BlueprintCallable, Category = "AR Settings")
280 UE_API const TArray<UARCandidateObject*>& GetCandidateObjectList() const;
282 UFUNCTION(BlueprintCallable, Category = "AR Settings")
283 UE_API void SetCandidateObjectList(const TArray<UARCandidateObject*>& InCandidateObjects);
285 UFUNCTION(BlueprintCallable, Category = "AR Settings")
286 UE_API void AddCandidateObject(UARCandidateObject* CandidateObject);
287
289 UFUNCTION(BlueprintCallable, Category = "AR Settings")
290 UE_API FARVideoFormat GetDesiredVideoFormat() const;
292 UFUNCTION(BlueprintCallable, Category = "AR Settings")
293 UE_API void SetDesiredVideoFormat(FARVideoFormat NewFormat);
294
296 UFUNCTION(BlueprintCallable, Category = "AR Settings")
297 UE_API EARFaceTrackingDirection GetFaceTrackingDirection() const;
299 UFUNCTION(BlueprintCallable, Category = "AR Settings")
300 UE_API void SetFaceTrackingDirection(EARFaceTrackingDirection InDirection);
301
303 UFUNCTION(BlueprintCallable, Category = "AR Settings")
304 UE_API EARFaceTrackingUpdate GetFaceTrackingUpdate() const;
306 UFUNCTION(BlueprintCallable, Category = "AR Settings")
307 UE_API void SetFaceTrackingUpdate(EARFaceTrackingUpdate InUpdate);
308
310 UFUNCTION(BlueprintCallable, Category = "AR Settings")
311 UE_API EARSessionTrackingFeature GetEnabledSessionTrackingFeature() const;
312
314 UFUNCTION(BlueprintCallable, Category = "AR Settings")
315 UE_API EARSceneReconstruction GetSceneReconstructionMethod() const;
316
318 UFUNCTION(BlueprintCallable, Category = "AR Settings")
319 UE_API void SetSessionTrackingFeatureToEnable(EARSessionTrackingFeature InSessionTrackingFeature);
320
322 UFUNCTION(BlueprintCallable, Category = "AR Settings")
323 UE_API void SetSceneReconstructionMethod(EARSceneReconstruction InSceneReconstructionMethod);
324
326 bool ShouldDoHorizontalPlaneDetection() const { return bHorizontalPlaneDetection; }
328 bool ShouldDoVerticalPlaneDetection() const { return bVerticalPlaneDetection; }
329
331 UE_API const TArray<uint8>& GetSerializedARCandidateImageDatabase() const;
332
334 UE_API UClass* GetPlaneComponentClass(void) const;
336 UE_API UClass* GetPointComponentClass(void) const;
338 UE_API UClass* GetFaceComponentClass(void) const;
340 UE_API UClass* GetImageComponentClass(void) const;
342 UE_API UClass* GetQRCodeComponentClass(void) const;
344 UE_API UClass* GetPoseComponentClass(void) const;
346 UE_API UClass* GetEnvironmentProbeComponentClass(void) const;
348 UE_API UClass* GetObjectComponentClass(void) const;
350 UE_API UClass* GetMeshComponentClass(void) const;
352 UE_API UClass* GetGeoAnchorComponentClass(void) const;
353
355 UMaterialInterface* GetDefaultMeshMaterial() const { return DefaultMeshMaterial; }
357 UMaterialInterface* GetDefaultWireframeMeshMaterial() const { return DefaultWireframeMeshMaterial; }
358
360 int32 GetMaxNumberOfTrackedFaces() const { return MaxNumberOfTrackedFaces; }
361
363 UPROPERTY(EditAnywhere, Category = "AR Settings | World Mapping")
364 bool bGenerateMeshDataFromTrackedGeometry;
365
367 UPROPERTY(EditAnywhere, Category = "AR Settings | World Mapping")
368 bool bGenerateCollisionForMeshData;
369
371 UPROPERTY(EditAnywhere, Category = "AR Settings | World Mapping")
372 bool bGenerateNavMeshForMeshData;
373
375 UPROPERTY(EditAnywhere, Category = "AR Settings | World Mapping")
376 bool bUseMeshDataForOcclusion;
377
379 UPROPERTY(EditAnywhere, Category = "AR Settings | World Mapping")
380 bool bRenderMeshDataInWireframe;
381
383 UPROPERTY(EditAnywhere, Category = "AR Settings | World Mapping")
384 bool bTrackSceneObjects;
385
387 UPROPERTY(EditAnywhere, Category = "AR Settings | Occlusion")
388 bool bUsePersonSegmentationForOcclusion = true;
389
391 UPROPERTY(EditAnywhere, Category = "AR Settings | Occlusion")
392 bool bUseSceneDepthForOcclusion = false;
393
395 UPROPERTY(EditAnywhere, Category = "AR Settings | Image Tracking")
396 bool bUseAutomaticImageScaleEstimation = true;
397
399 UPROPERTY(EditAnywhere, Category = "AR Settings")
400 bool bUseStandardOnboardingUX = false;
401
403 UE_API bool ShouldUseOptimalVideoFormat() const;
404
405private:
406 //~ UObject interface
408 //~ UObject interface
409
411 UPROPERTY(EditAnywhere, Category = "AR Settings")
413 EARWorldAlignment WorldAlignment;
414
416 UPROPERTY(EditAnywhere, Category = "AR Settings")
417 EARSessionType SessionType;
418
420 UPROPERTY()
421 EARPlaneDetectionMode PlaneDetectionMode_DEPRECATED;
422
424 UPROPERTY(EditAnywhere, Category = "AR Settings")
425 bool bHorizontalPlaneDetection;
426
428 UPROPERTY(EditAnywhere, Category = "AR Settings")
429 bool bVerticalPlaneDetection;
430
432 UPROPERTY(EditAnywhere, Category = "AR Settings")
433 bool bEnableAutoFocus;
434
436 UPROPERTY(EditAnywhere, Category = "AR Settings")
437 EARLightEstimationMode LightEstimationMode;
438
440 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = "AR Settings")
441 EARFrameSyncMode FrameSyncMode;
442
444 UPROPERTY(EditAnywhere, Category="AR Settings")
445 bool bEnableAutomaticCameraOverlay;
446
448 UPROPERTY(EditAnywhere, Category="AR Settings")
449 bool bEnableAutomaticCameraTracking;
450
452 UPROPERTY(EditAnywhere, Category="AR Settings")
453 bool bResetCameraTracking;
454
456 UPROPERTY(EditAnywhere, Category="AR Settings")
457 bool bResetTrackedObjects;
458
460 UPROPERTY(EditAnywhere, Category="AR Settings | Image Tracking")
462
464 UPROPERTY(EditAnywhere, Category="AR Settings | Image Tracking")
465 int32 MaxNumSimultaneousImagesTracked;
466
468 UPROPERTY(EditAnywhere, Category="AR Settings")
469 EAREnvironmentCaptureProbeType EnvironmentCaptureProbeType;
470
472 UPROPERTY(VisibleAnywhere, Category="AR Settings | World Mapping")
473 TArray<uint8> WorldMapData;
474
476 UPROPERTY(EditAnywhere, Category="AR Settings")
478
483 UPROPERTY(EditAnywhere, Category="AR Settings")
484 FARVideoFormat DesiredVideoFormat;
485
487 UPROPERTY(EditAnywhere, Category="AR Settings")
488 bool bUseOptimalVideoFormat = true;
489
491 UPROPERTY(EditAnywhere, Category="Face AR Settings")
492 EARFaceTrackingDirection FaceTrackingDirection;
493
495 UPROPERTY(EditAnywhere, Category="Face AR Settings")
496 EARFaceTrackingUpdate FaceTrackingUpdate;
497
499 UPROPERTY(EditAnywhere, Category="Face AR Settings")
500 int32 MaxNumberOfTrackedFaces = 1;
501
503 UPROPERTY()
504 TArray<uint8> SerializedARCandidateImageDatabase;
505
507 UPROPERTY(EditAnywhere, Category="AR Settings")
509
511 UPROPERTY(EditAnywhere, Category="AR Settings")
513
515 UPROPERTY(EditAnywhere, Category = "AR Gameplay")
516 TSubclassOf<UARPlaneComponent> PlaneComponentClass;
517
519 UPROPERTY(EditAnywhere, Category = "AR Gameplay")
520 TSubclassOf<UARPointComponent> PointComponentClass;
521
523 UPROPERTY(EditAnywhere, Category = "AR Gameplay")
524 TSubclassOf<UARFaceComponent> FaceComponentClass;
525
527 UPROPERTY(EditAnywhere, Category = "AR Gameplay")
528 TSubclassOf<UARImageComponent> ImageComponentClass;
529
531 UPROPERTY(EditAnywhere, Category = "AR Gameplay")
532 TSubclassOf<UARQRCodeComponent> QRCodeComponentClass;
533
535 UPROPERTY(EditAnywhere, Category = "AR Gameplay")
536 TSubclassOf<UARPoseComponent> PoseComponentClass;
537
539 UPROPERTY(EditAnywhere, Category = "AR Gameplay")
540 TSubclassOf<UAREnvironmentProbeComponent> EnvironmentProbeComponentClass;
541
543 UPROPERTY(EditAnywhere, Category = "AR Gameplay")
544 TSubclassOf<UARObjectComponent> ObjectComponentClass;
545
547 UPROPERTY(EditAnywhere, Category = "AR Gameplay")
548 TSubclassOf<UARMeshComponent> MeshComponentClass;
549
551 UPROPERTY(EditAnywhere, Category = "AR Gameplay")
552 TSubclassOf<UARGeoAnchorComponent> GeoAnchorComponentClass;
553
555 UPROPERTY(EditAnywhere, Category = "AR Settings | World Mapping")
556 TObjectPtr<UMaterialInterface> DefaultMeshMaterial;
557
559 UPROPERTY(EditAnywhere, Category = "AR Settings | World Mapping")
560 TObjectPtr<UMaterialInterface> DefaultWireframeMeshMaterial;
561};
562
563#undef UE_API
EARFrameSyncMode
Definition ARSessionConfig.h:98
EARPlaneDetectionMode
Definition ARSessionConfig.h:66
EARLightEstimationMode
Definition ARSessionConfig.h:81
EARFaceTrackingUpdate
Definition ARSessionConfig.h:128
EARWorldAlignment
Definition ARSessionConfig.h:20
#define UE_API
Definition ARSessionConfig.h:13
EARSessionType
Definition ARSessionConfig.h:37
EARSessionTrackingFeature
Definition ARSessionConfig.h:142
EAREnvironmentCaptureProbeType
Definition ARSessionConfig.h:111
EARSceneReconstruction
Definition ARSessionConfig.h:167
EARFaceTrackingDirection
Definition ARTrackable.h:254
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define ENUM_CLASS_FLAGS(Enum)
Definition EnumClassFlags.h:6
return true
Definition ExternalRpcRegistry.cpp:601
const bool
Definition NetworkReplayStreaming.h:178
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define UCLASS(...)
Definition ObjectMacros.h:776
#define UENUM(...)
Definition ObjectMacros.h:749
uint8_t uint8
Definition binka_ue_file_header.h:8
Definition Archive.h:1208
Definition Array.h:670
Definition SubclassOf.h:30
Definition ARTypes.h:313
Definition ARTypes.h:381
Definition ARComponent.h:608
Definition ARComponent.h:424
Definition ARComponent.h:700
Definition ARComponent.h:486
Definition ARComponent.h:662
Definition ARComponent.h:635
Definition ARComponent.h:328
Definition ARComponent.h:369
Definition ARComponent.h:574
Definition ARComponent.h:530
Definition ARSessionConfig.h:183
UMaterialInterface * GetDefaultMeshMaterial() const
Definition ARSessionConfig.h:355
bool ShouldDoHorizontalPlaneDetection() const
Definition ARSessionConfig.h:326
int32 GetMaxNumberOfTrackedFaces() const
Definition ARSessionConfig.h:360
UMaterialInterface * GetDefaultWireframeMeshMaterial() const
Definition ARSessionConfig.h:357
bool ShouldDoVerticalPlaneDetection() const
Definition ARSessionConfig.h:328
Definition Class.h:3793
Definition DataAsset.h:21
Definition MaterialInterface.h:296
Definition RobinHoodHashTable.h:18
@ false
Definition radaudio_common.h:23
U16 Index
Definition radfft.cpp:71
Definition ARTypes.h:489
Definition ObjectPtr.h:488