This is a package created for and by the CPVRLab of the BFH. It contains assets which are commonly used together in new VR projects by members of the CPVRLab. Please refer to the Unity documentation regarding the handling of a custom UPM package.
- Open the project settings and set up XR Plugin Management
- Head to the package manager, add a package via git URL and paste the following URL: https://github.com/cpvrlab/cpvr-vr-suite.git
- In the project settings, set OpenXR as Plugin provider and configure the feature groups as well as the interaction profiles for the desired platform
- In order to use the overlay keyboard when using a Meta Quest 2 or Pro headset, a custom AndroidManifest.xml and folder structure has to be created.
- Create the following folder structure: Assets/Plugins/Android
- Create a file within the Android folder named AndroidManifest.xml
- Paste the following content into the newly created file:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.unity3d.player" xmlns:tools="http://schemas.android.com/tools"> <application> <activity android:name="com.unity3d.player.UnityPlayerActivity" android:theme="@style/UnityThemeSelector"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <meta-data android:name="unityplayer.UnityActivity" android:value="true" /> </activity> </application> <uses-feature android:name="oculus.software.overlay_keyboard" android:required="false"/> </manifest>
- Go to Project Settings -> Player -> Publishing Settings and make sure that the Checkbox for Custom Main Manifest is checked
- A custom AndroidManifest.xml is provided within the package but needs to manually be moved to the appropriate location.
- Place the Persistent Objects prefab in an empty scene and add it to the build index
- Add your additional scenes to the build index without the Persistent Object prefab, camera or any other XR Rig in them
- Place the Network Complete VR Rig prefab in an empty scene alongside the NetworkManager and NetworkController which can be found in the Network folder within the prefabs.
- In the NetworkController add a reference to the NetworkManager instance in the scene.
- Add your additional scenes to the build index without the VR Rig or camera in them.
In order to send emails via the screenshotmenu a valid EmailLogin.json file must be provided and stored in 'Assets/Resources/Secrets'. It is forbidden to push this file to a repository as it contains the necessary credentials for the sending email account.
Additionally it must be verified that the following two settings are correctly set in the Project Settings.
- Player > Internet Acces: Required
- XR Plugin Management > OpenXR > Meta Quest Support Settings (Gear icon) > Manifest Settings > Force Remove Internet: false (unticked)
If you wish to extend the functionality of this package, there are two basic ways to accomplish this.
- If you are using a blank project, you can directly clone this repository into your 'Assets' folder. Open a Terminal in your project folder then use the following commands:
cd Assets
git clone https://gitlab.ti.bfh.ch/VR/cpvrlab-vr-suite.git
After the package has been cloned into your Assets folder, you can extend its functionality and push changes directly to the repository.
- If you are using a project, which is already a git project, you can add this package as a submodule by using these commands:
cd existing_repo
cd Assets
git submodule add https://gitlab.ti.bfh.ch/VR/cpvrlab-vr-suite.git
Changes made to the package can be pushed from within the folder directly. Otherwise refer to the git documentation.
Make sure to increment the version number in the package.json file.