VR Cave support
VIROO Applications are VR and Desktop compatible. To add CAVE support, once you have completed the Creating a VIROO Application steps, you will need to follow this article.
To add support for CAVE, VIROO Studio packages containing the necessary functionality must be added:
- com.viroo.tracking.dtrack and com.viroo.sceneloader.dtrack: add DTrack support.
- com.viroo.multidisplay and com.viroo.sceneloader.multidisplay: support for rendering from a user's perspective in CAVE.
- com.viroo.stereorender: support for native stereoscopic rendering.
After adding these packages, the VIROO Main scene must be modified to add the prefabs corresponding to these packages. The next sections explain how to add the packages and how to add them to the VIROO Main scene.
Add new scopes to OpenUPM scoped registry
To add new packages needed for CAVE support, you need to add new scopes to OpenUPM scoped registry. You can do it from the Unity Editor or by editing the manifest.json.
Using the Unity Editor
Open Edit -> Project Settings -> Package Manager and follow this steps:
- In the
Scoped Registriessection select OpenUPM (package.openupm.com). - In the
Scopeslists, press+twice and add:- com.ar-tracking
- jp.keijiro
Editing manifest.json file
You can find the project manifest file, called manifest.json, in the Packages folder under the root folder of your Unity project.
Find the scopedRegistries block. Locate the OpenUpm and add com.ar-tracking and jp.keijiro to the scopes list:
{
"dependencies": {
/* ... your dependencies ... */
},
"scopedRegistries": [
/* ... other scoped registries ... */
{
"name": "OpenUPM",
"url": "https://package.openupm.com",
"scopes": [
"com.cysharp.unitask",
"com.openupm",
"com.ar-tracking",
"jp.keijiro"
]
}
]
}
Install VR CAVE packages
The following Viroo packages should be added to the project:
- com.viroo.tracking.dtrack
- com.viroo.sceneloader.dtrack
- com.viroo.multidisplay
- com.viroo.sceneloader.multidisplay
- com.viroo.stereorender
The latest package version for each of the packages can be found in the Viroo feed.
It's possible to add the necessary packages in Unity in two different ways. Choose the one you prefer from the following.
Using the Unity Editor
Open Window -> Package Manager.
To install the needed packages:
- Click the
add (+) buttonin the status bar. - Select
Add package by namefrom the add menu. - Enter the package name, from the previous list, in the
namefield. - Enter the exact version (for example:
1.0.0) in theversionfield. - Click
Add.
This process must be repeated for each of the packages listed.
Editing manifest.json file
Follow the steps below:
- Open
manifest.jsonfile. - Add the references to the VR CAVE packages in the
dependenciessection.
{
"dependencies": {
/* ... your other dependencies ... */
"com.viroo.multidisplay": "1.0.0", /* Change 1.0.0 to the correct version */
"com.viroo.stereorender": "1.0.0", /* Change 1.0.0 to the correct version */
"com.viroo.sceneloader.dtrack": "1.0.0", /* Change 1.0.0 to the correct version */
"com.viroo.sceneloader.multidisplay": "1.0.0", /* Change 1.0.0 to the correct version */
"com.viroo.tracking.dtrack": "1.0.0", /* Change 1.0.0 to the correct version */
},
},
- Return to Unity Editor to download the packages.
Add VR CAVE prefabs to main VIROO scene
Locate the main scene for the project (created from the VIROO Main scene template).
To it, the following prefabs should be added. To find these prefabs, you can use the Search function of the Unity Project tab, selecting the In packages option.
- VirooDTrack
- VirooMultiDisplay
- VirooSceneLoaderDTrack
- VirooSceneLoaderMultiDisplay
- VirooStereoRender
Save the scene.