This sample provides blueprints illustrating the use of VR compositor layers to display a UMG UI widgets.
The app displays two spheres that track with the Touch controllers and two UMG widgets rendered as VR compositor layers. One is rendered as a quad layer and the other as a cylinder layer.
Actor_Blueprint illustrates rendering a widget into a stereo layer. The widget is first rendered into a material, then the SlateUI texture is pulled from the material into the stereo layer. This is the UMG widget that is rendered to the quad and cylindrical layers in the sample.
Open MenuBlueprint to open the UMG widget in the UMG Editor.
NewGameMode and VRCharacter are used to initialize the scene and make the scene display at the appropriate height.
First, ensure you have Git LFS installed by running this command:
git lfs install
Then, clone this repo using the "Code" button above, or this command:
git clone https://github.com/oculus-samples/Unreal-LayerSample
The easiest way to get started is to use the prebuilt Unreal Engine from the Epic Games Launcher, with MetaXR plugin.
LayerSample.uproject
The Meta fork of Epic’s Unreal Engine will give you the most up to date integration of Oculus features. However, you must build the editor from its source.
Follow the instructions on Accessing Unreal Engine source code on GitHub to obtain:
Make sure you have Visual Studio installed properly:
LayerSample.uproject
Depending on your machine, the build may take awhile to complete.
The Meta License applies to the SDK and supporting material. The MIT License applies to only certain, clearly marked documents. If an individual file does not indicate which license it is subject to, then the Meta License applies.