Set up Hololight Stream Unreal Engine VR Template for Hololight Stream for Unreal Engine

Set up Hololight Stream Unreal Engine VR Template

Hololight Stream comes with its own ready-to-go modified version of Unreal’s VR Template. To find the template select Content Browser/Drawer > Settings > Show Plugin Content.

The Hololight Stream VR Template uses Unreal Engine 5.5 and is not available in older versions of Unreal Engine.

Changes in the Hololight Stream Unreal Engine VR Template

Motion Controller Sources

To track motion controllers and hands, Motion Controller Components use Motion Sources. In the Unreal Engine VR Template, the base sources are LeftGrip and RightGrip. Instead Hololight Stream supports Left and Right as the base sources. Because of this, the VRPawn and GrabComponent are modified with the correct motion sources.

Controller and hand visualization

The package includes models for the various controllers for the different supported clients. When the application runs and a client connects to it, the application uses these models to visualize the user’s controllers. The application will also visualize tracked hands. VRPawn visualizes the controllers or hands when a client connects.

Custom game instance

A custom GameInstance Blueprint in the Hololight Stream VR Template keeps track of the connection state between Levels. This GameInstance type lets Blueprints get the current connection state. Select Project Settings > Maps & Modes > Game Instance Class to set this custom game instance.

Input mapping

The Unreal Engine Template has input mappings for the default devices it supports. These mappings are modified to leave out unsupported devices and add devices supported by Hololight Stream.

VRPawn

Unreal Engine’s VRPawn, which is included in their default VR Template, handles most of the required functionality in Hololight Stream. This includes the main input actions, controller tracking, and more, but that isn’t everything. In addition to this functionality, the Hololight Stream VR Template adds controller and hand visualization to the VRPawn and implements Hololight Stream’s Connection State Handler and Controller State Handler interfaces to add logic for client and controller connection and disconnection. There are also examples of Hololight Stream types and functions inside the Blueprint. You can find more information by looking into the comments in the Blueprint itself.

Hololight Stream VR Template VRPawn Blueprint functions
Blueprint Description
void RegisterConnectionStateHandler(TScriptInterface<IStreamConnectionStateHandler> ConnectionStateHandler)

Registers the object or actor that implements the IStreamConnectionStateHandler interface to the XR System’s OnConnectionStateChanged event. This event returns the new connection state, which can be "Disconnected", "Connecting", "Connected", "Closing", and "Failed".

void UnregisterConnectionStateHandler (TScriptInterface<IStreamConnectionStateHandler> ConnectionStateHandler)

Unregisters the object or actor that implements the IStreamConnectionStateHandler interface from the XR System. Causes the object to stop receiving the events.

void RegisterControllerStateHandler (TScriptInterface<IStreamControllerStateHandler> ControllerStateHandler)

Registers the object or actor that implements the IStreamControllerStateHandler interface to the XR Input System’s OnControllerStateChanged event. This event returns the new state, which consists of the controller name, tracking status, controller type, and handedness.

void UnregisterControllerStateHandler (TScriptInterface<IStreamControllerStateHandler> ControllerStateHandler)

Unregisters the object or actor that implements the IStreamControllerStateHandler interface from the XR System. Causes the object to stop receiving the events.

Widget menu

The Hololight Stream VR Template adds additional buttons to the Widget Menu in the VR Template. These buttons are for toggling passthrough, audio, microphone, and disconnection. These buttons demonstrate Hololight Stream features through Blueprint functions.

Pose prediction widget

In the Hololight Stream VR Template the Pose Blueprint and the PosePrediction Widget Blueprint add an extra 3D widget to the VR Template map to showcase the different pose prediction settings that can be applied at runtime.