IXRSystemAssets::CreateRenderComponent

Attempts to spawn a renderable component for the specified device.

Windows
MacOS
Linux

References

Module

HeadMountedDisplay

Header

/Engine/Source/Runtime/HeadMountedDisplay/Public/IXRSystemAssets.h

Include

#include "IXRSystemAssets.h"

Syntax

UPrimitiveComponent * CreateRenderComponent
(
    const int32 DeviceId,
    AActor * Owner,
    EObjectFlags Flags,
    const bool bForceSynchronous,
    const FXRComponentLoadComplete & OnLoadComplete
)

Remarks

Attempts to spawn a renderable component for the specified device. Returns a component that needs to be attached and registered by the caller.

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.

Returns

A valid component pointer if the method succeeded, otherwise null.

Parameters

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.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss