The XR Unity Player is an interactive and XR-capable glTF scene viewer supporting glTF extensions specified in the MPEG-I Scene Description framework (ISO/IEC 23090-14), implemented in Unity3D. These extensions support features such as video textures, spatial audio sources, interactivity behaviors, AR anchors, ...
Additional information can be found at: https://5g-mag.github.io/Getting-Started/pages/xr-media-integration-in-5g/
The project supports the latest Unity3D LTS editor release, Unity 2022.3.
The XR Player feature set dependends on the target platform. See the features page implementation status.
It is currently developped, tested and built for Windows and Android targets.
The project has dependencies which are not delivered through UPM (Unity's Package Manager), but instead are tracked as git submodules.
clone the project and fetch all submodules
mkdir gltfsceneviewer && cd gltfsceneviewer
git clone https://github.com/5G-MAG/rt-xr-unity-player.git .
git submodule update --init --recursive
The project has dependencies which aren't supplied through UPM and are maintained on the 5G-MAG github organization:
com.atteneder.glTFast
[!IMPORTANT] Refer to this documentation if you are contributing to these dependencies.
Build Settings
menuThe XR player allows configuration of a default scene URI, which can be overiden when running the player from the command line.
Support for spatial audio, Unity3D requires an Audio Spatializer has to be configured in the project settings Edit > Project Settings > Audio > Spatializer Plugin.
If no audio spatializer plugin is configured, audio will play without spatialization.
Please refer to Unity's documentation for details and a list of available plugins.
Unity provides a native audio spatializer SDK with a simple spatializer implementation.
https://docs.unity3d.com/Manual/xr-configure-providers.html
The player can be launched from a command line specifying a scene document to load:
If no gltf document is specified, the default scene configured in the project is used.
If an OpenXR HMD is detected, it is used to render and control the camera.
Otherwise, the player renders in a regular desktop OS window, and camera is controled using keyboard and mouse.
Key | Action |
---|---|
mouse drag | look around |
arrow UP | move forward |
arrow DOWN | move backward |
arrow LEFT | move left |
arrow RIGHT | move right |
mouse wheel | move up/down |
left shift | faster |
right shift | faster |
Tab | reset main camera |
L | toggle log overlay |
This project is developed under 5G-MAG's Public License. For the full license terms, please see the LICENSE file distributed along with the repository or retrieve it from here.