Getting Started with SRWorks Experience in Unreal¶
To work with this demo project, it is important to have some understanding of Unreal including the use of the Motion Controller class, Blueprint, Level Streaming, and the Game Instance class. To start, unzip the file SRWorks_Experience.zip and manually build the solution. Then open the project file Experience_Unreal.uproject.
In Content Browser, open Content > Maps > Persistent Map. In the Levels window, you will see that all maps have already been added:
Persistent Level contains a set of ViveSR actors. These actors contains functions of SRWorks. Each level in this project references some of those actors.
BP_GameStart serves two purposes: 1. Storing the actor ViveSR1 as a reference in BP_Experience_SaveGame. for it to be used cross levels 2. Loading all the levels upon BeginPlay and sets only the starting level, or Level1_Effect_ModeSwitch, to visible.
Persistent Level loads seven other levels from seven other maps:
Each map contains a child blueprint of ViveMotionController, which serves three purposes:
Initiating tracking of the HMD and the Vive Controllers,
Finding reference of ViveSR from BP_Experience_SaveGame, and
Handling the controller input, Grip, for switching levels.
The child Blueprints of ViveMotionController handle controller input for demonstrating different features of SRWorks. For example, in Leve1_Effect_ModeSwitch, Vive_MotionController_Effects is to control two of the many features of SRWorks:
Mode Switch—switching between VR Mode and Mix Mode and
Shader Effects—switching the shaders for the pass-through planes
This structure also applies to all other six levels. Each level has a child Blueprint of ViveMotionController that handles controller input and each of them demonstrates part of what SRWorks can do.