Module |
|
Header |
/Engine/Source/Runtime/HeadMountedDisplay/Public/IXRSystemAssets.h |
Include |
#include "IXRSystemAssets.h" |
UPrimitiveComponent * CreateRenderComponent
(
const int32 DeviceId,
AActor * Owner,
EObjectFlags Flags,
const bool bForceSynchronous,
const FXRComponentLoadComplete & OnLoadComplete
)
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.
A valid component pointer if the method succeeded, otherwise null.
Parameter |
Description |
---|---|
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. |