Git Product home page Git Product logo

cpvr-vr-suite's Introduction

CPVRLab-VR-Suite

About

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.

Adding this package to a Unity project

  1. Open the project settings and set up XR Plugin Management
  2. Head to the package manager, add a package via git URL and paste the following URL: https://github.com/cpvrlab/cpvr-vr-suite.git
  3. In the project settings, set OpenXR as Plugin provider and configure the feature groups as well as the interaction profiles for the desired platform
  4. 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.
    1. Create the following folder structure: Assets/Plugins/Android
    2. Create a file within the Android folder named AndroidManifest.xml
    3. 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>
    
    1. Go to Project Settings -> Player -> Publishing Settings and make sure that the Checkbox for Custom Main Manifest is checked
    2. A custom AndroidManifest.xml is provided within the package but needs to manually be moved to the appropriate location.

Scene setup

  1. Place the Persistent Objects prefab in an empty scene and add it to the build index
  2. Add your additional scenes to the build index without the Persistent Object prefab, camera or any other XR Rig in them

Sending screenshots via Email

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)

Extending this package

If you wish to extend the functionality of this package, there are two basic ways to accomplish this.

  1. 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.

  1. 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.

cpvr-vr-suite's People

Contributors

hsm4 avatar saschaledermann avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cpvr-vr-suite's Issues

Add check for correct project settings regarding internet access

Either with an Editor script, which alerts the user in a similar fashion to when an interaction profile is missing in the XR settings with an automatic fix option or by disabling the screenshot button if the permission is not available in the built AndroidManifest.xml.

Redesign scene selection buttons

The scene selection menu should include a sprite, followed by text. If possible make the whole section clickable and not just the sprite.
image

Refactor panels

Refactor the menupanels so they are more open to extension.

Screenshot sending on Quest 2 does not work

Sending a screenshot by email does currently not work on a Quest 2 build. The caught exception is:
SocketException, Unable to resolve 'smtp.google.com'
However, sending an email in playmode does work fine.

A possible cause could be that the app does not have the required permissions to use the network.
Some permissions were already added to the Androidmanifest.xml, which did not end up fixing the issue.
To troubleshoot it further, a script should be written, which sends network requests (ICMP) to different endpoints like localhost, default gateway and some external addresses (switch.ch, google.com).

Add hand menu to controllers

The hand menu currently only works when using hand tracking. The menu should work the same way using either input method.

Add scene specific panels to hand UI

Dynamically load and unload scene specific panels to the hand menu. A complete integration routine needs to be implemented which adds triggers for hover and click events and also a button on the main panel needs to be added which enables the user to switch to the added panel.

(invalid) Storing email/password in MailSender.cs

Is a security issue.
I suggest, you store the values in a seperate file (e.g. Asset/Resources/Secrets/EmailLogin.json) and load it when you want to send an E-Mail. This file can then be excluded by .gitignore. And please change the password afterwards.

Simple VR Gaze interaction

Implement gaze interaction which enables the user to unlock additional elements by looking at objects for a short duration.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.