First, ensure you have Git LFS installed by running this command:
git lfs installThen, clone this repo using the "Code" button above, or this command:
git clone https://github.com/oculus-samples/Unreal-HandsTrainSampleThe easiest way to get started is to use the prebuilt Unreal Engine from the Epic Games Launcher, with MetaXR plugin.
- Install the Epic Games Launcher
- In the launcher, install UE5 (recommended).
- Download and install the MetaXR plugin from the Unreal Engine 5 Integration download page.
- Launch the Unreal Editor
- From "Recent Projects", click "Browse" and select
HandsTrainSample.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:
- an Epic account
- a GitHub account
- authorization to access the Unreal Engine source repository Disregard instructions on downloading Epic’s Unreal Engine source code as you will be building the Meta fork of Epic’s Unreal Engine source.
Make sure you have Visual Studio installed properly:
- Launch the Visual Studio Installer and click Modify for the Visual Studio version you want to use.
- Under the Workloads tab, click Game development with C++ if it isn’t checked and then click Modify.
- Download the source code from the Meta fork of Epic’s Unreal Engine on GitHub.
- Open a command prompt in the root of the Unreal, then run this command:
.\GenerateProjectFiles.bat -Game HandsTrainSample -Engine <full path to Unreal-HandsTrainSample directory>\HandsTrainSample.uproject- Open the
HandsTrainSample.slnfile that has been generated in theUnreal-HandsTrainSampledirectory. - Set
HandsTrainSampleas the start-up project andDevelopment Editoras the configuration. - Hit
F5to build and debug the project (and the engine).- 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.
- Update to use OpenXR from Epic
- If running on a Quest2 device, you may experience low FPS when using GPU occlusion. You can either switch to the Meta Fork of Unreal Engine and use CPU Occlusions (UE5.5.4 or later)
or add
r.AllowOcclusionQueries 0over a blueprint node. See LevelBlueprint as example.