Navigation
API > API/Runtime > API/Runtime/HeadMountedDisplay > API/Runtime/HeadMountedDisplay/IXRSystemAssets
Description
Attempts to spawn a renderable component for the specified device. Returns a component that needs to be attached and registered by the caller.
NOTE: Resource loads for this component may be asynchronous. The component can be attached and registered immediately, but there may be a delay before it renders properly. To make the operation synchronous use the bForceSynchronous param.
| Name | CreateRenderComponent |
| Type | function |
| Header File | /Engine/Source/Runtime/HeadMountedDisplay/Public/IXRSystemAssets.h |
| Include Path | #include "IXRSystemAssets.h" |
UPrimitiveComponent * CreateRenderComponent
(
const int32 DeviceId,
AActor * Owner,
EObjectFlags Flags,
const bool bForceSynchronous,
const FXRComponentLoadComplete & OnLoadComplete
)
A valid component pointer if the method succeeded, otherwise null.
Parameters
| Name | Remarks |
|---|---|
| DeviceId | Uniquely identifies the XR device you want to render. |
| Owner | The actor which this component will be attached to. |
| Flags | Object creation flags to spawn the component with. |
| bForceSynchronous | Forces the any associated resource loads to complete before returning. |
| OnLoadComplete | Model load callback, useful for when the load is asynchronous - should be triggered for synchronous loads as well. |