Navigation
API > API/Plugins > API/Plugins/XRBase > API/Plugins/XRBase/UXRAssetFunctionLibrary
References
| Module | XRBase |
| Header | /Engine/Plugins/Runtime/XRBase/Source/XRBase/Public/XRAssetFunctionLibrary.h |
| Include | #include "XRAssetFunctionLibrary.h" |
| Source | /Engine/Plugins/Runtime/XRBase/Source/XRBase/Private/XRAssetFunctionLibrary.cpp |
UFUNCTION&40;BlueprintCallable, Category&61;"XR&124;Devices", Meta&61;&40;DefaultToSelf&61;"Target"&41;&41;
static UPrimitiveComponent &42; AddNamedDeviceVisualizationComponentBlocking
&40;
AActor &42; Target,
const FName SystemName,
const FName DeviceName,
bool bManualAttachment,
const FTransform & RelativeTransform,
FXRDeviceId & XRDeviceId
&41;
Remarks
Spawns a render component for the specified XR device.
NOTE: The associated XR system backend has to provide a model for this to work - if one is not available for the specific device, then this will fail and return an invalid (null) object. A new component representing the specified device (invalid/null if a model for the device doesn't exist).
Parameters
| Name | Description |
|---|---|
| Target | The intended owner for the component to attach to. |
| SystemName | (optional) Targets a specific XR system (i.e. 'Oculus', 'OpenXR', etc.). If left as 'None', then the first system found that can render the device will be used. |
| DeviceName | Source name of the specific device - expect the same names that the MotionControllerComponent's "MotionSource" field uses ('Left', 'Right', etc.). |
| bManualAttachment | If set, will leave the component unattached (mirror's the same option on the generic AddComponent node). When unset the component will attach to the actor's root. |
| RelativeTransform | Specifies the component initial transform (relative to its attach parent). |