UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IIdentifiableXRDevice.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h" // for FName
6#include "HAL/Platform.h"
7#include "Templates/TypeHash.h" // for HashCombine()
8#include "UObject/NameTypes.h"
10
11#include "IIdentifiableXRDevice.generated.h"
12
14{
15public:
22 virtual FName GetSystemName() const = 0;
23};
24
37{
38public:
45 virtual int32 GetSystemDeviceId() const = 0;
46
49 {
50 const uint32 DomainHash = GetTypeHash(XRDevice.GetSystemName());
51 const uint32 DeviceHash = GetTypeHash(XRDevice.GetSystemDeviceId());
53 }
54};
55
56USTRUCT(BlueprintType)
58{
60
61public:
65
66 HEADMOUNTEDDISPLAY_API bool IsOwnedBy(IXRSystemIdentifier* XRSystem) const;
68
69 bool IsSet() const
70 {
71 // Since DeviceId's value is determined internally by the system, there's
72 // no agreed upon 'invalid' DeviceId, so this is the best way to detect a potentially bad identifier
73 return !SystemName.IsNone();
74 }
75
76 HEADMOUNTEDDISPLAY_API bool operator==(const FXRDeviceId& Rhs) const;
77 HEADMOUNTEDDISPLAY_API bool operator==(const IIdentifiableXRDevice* Rhs) const;
78
79public:
80 UPROPERTY(BlueprintReadOnly, Category="XRDevice")
81 FName SystemName;
82 UPROPERTY(BlueprintReadOnly, Category="XRDevice")
83 int32 DeviceId;
84};
85
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 UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define USTRUCT(...)
Definition ObjectMacros.h:746
#define GENERATED_USTRUCT_BODY(...)
Definition ObjectMacros.h:767
constexpr uint32 HashCombine(uint32 A, uint32 C)
Definition TypeHash.h:36
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition NameTypes.h:617
Definition IIdentifiableXRDevice.h:37
virtual int32 GetSystemDeviceId() const =0
friend uint32 GetTypeHash(const IIdentifiableXRDevice &XRDevice)
Definition IIdentifiableXRDevice.h:48
Definition IIdentifiableXRDevice.h:14
virtual FName GetSystemName() const =0
Definition IIdentifiableXRDevice.h:58
bool IsSet() const
Definition IIdentifiableXRDevice.h:69