Hello. My name is Ryan, and this is a guide for the "EasierVRAssets" package. As the developer of this package, I feel that it is strongly within my responsibility to explain what this package is and how to use it.
The "EasierVRAssets" package is a set of scripts and prefabs intended to make life a little easier for developers working with the Oculus Quest in Unity. While working with VR for school projects, I sometimes found that the "Oculus Implementations" package available in the Unity Asset Store was very cumbersome to use and often had bugs in their code. I wanted to create a VR toolkit that would be simpler to use and more efficient in terms of workload on the developer.
In order to get this package working, you need to do several things prior:
- Make sure that on whatever version of Unity you are working with, that you have the Android DevTools installed in Unity.
- You must have the “Oculus Integragion” installed in your Unity project. This Oculus package is still required, as many scripts in "EasierVRAssets" still utilize aspects of the OVR scripts from the "Oculus Integration" package.
"EasierVRAssets" does not rely on Unity's new XR systems. For developers who wish to migrate to Unity XR's new system, I have a Github repository that offers tools and tips on how to develop VR apps with the new Unity XR system here.
Topics:
- Simplified Oculus Integration Setup
- Setting Up Android Environment
- Importing Oculus Integration
- Setting Up Oculus Integration
- Setting Up EasierVRAssets
In order to get this project to work, you must install the "Oculus Integration" first, then adjust the settings of your Unity project to output properly for the Oculus. To install the "Oculus Integration" package, I highly recommend that you refer to existing guides on how to do so. The guides that tend to work best on a fresh install of Unity are listed below. I'll also highlight the most important steps that worked for me with a fresh install of Unity.
- Dilmer Valecillos's overall guide to Unity documentation
- Oculus's documentation on Unity implementations
- Open Project in Unity
File
-->Build Settings
- On
Platform
, selectAndroid
- Click
Switch Platform
- Close the
Build Settings
window - it will be needed later, but not immediately
- Click
Asset Store
tab in the main editor panel - Click
Search Online
- Search for "Oculus" in the search bar
- Select "Oculus Integration" from the search results
- Either download (if it's your first time) or
Open in Unity
(if you already installed the integrations package before) Window
-->Package Manager
- Select
Oculus Integration
, import the package. Make sure to update it, if possible.- NOTE: BE CAREFUL ABOUT IF YOU'RE UPDATING WITH A PRE-EXISTING PROJECT WHEN UPDATING.
- In the new window that pops up, make sure to import everything into your project.
-
File
-->Build Settings
-
Player Settings
(in the bottom-left corner) -
(Optional) In the top-right, modify the "Company Name", "Product Name", and "Version"
-
Other Settings
tab -
Minimum API Level
- set toAndroid 6.0 Marshmallow
-
Target API Level
- set toAutomatic (highest installed)
-
Install Location
- set toAutomatic
-
On the left,
XR Plug-in Management
-
(If you haven't already)
Install XR Plug-in Management
-
On the "Android" tab (right tab), select
Oculus
-
On the left, click the new dropdown under
XR Plug-in Management
-
Select
Oculus
-
On the left,
Player
-
Other Settings
tab -
Color Space
- change fromGamma
toLinear
-
Graphics API
- RemoveVulkan
, setOpenGLES 3
as the topmost API -
Multithreaded Rendering
- checkmark it
To install the "EasierVRAssets" package, simply clone this repo into your local computer, and then add the package to your Unity Project. Unity should automatically import all scripts and assets onto the computer from here.
The contents of the "EasierVRAssets" consist of the following:
- EasierVRAssets/
- README.md: this file.
- ChangeLog.md: Contains the list of changes made to this package.
- EVRA_CoreElements: All scripts, prefabs, and materials needed to run a bare-bones VR implementation.
- EVRA_Grab/: Sub-package for needed to allow for grabbing objects with hands.
- README.md: A summary of the EVRA_Grab sub-package.
- Materials/: The materials used by this sub-package.
- Prefabs/: Prefabs created as either examples or convenient usage in Unity.
- Scripts/: Scripts used in this sub-package.
- Deprecated/: All deprecated scripts, prefabs, materials, and scenes that came with previous versions of this sub-package.
- EVRA_Pointer: Sub-package needed to allow for line pointers. Can be used with other sub-packages (ex. distance grabbing, locomotion).
- README.md: A summary for the EVRA_Pointer sub-package
- Materials/: The materials used by this sub-package
- Prefabs/: Prefabs created as either examples or convenient usage in Unity.
- Scripts/: Scripts used in this sub-package.
- EVRA_Locomotion: Sub-package needed to allow for locomotion outside of the default joystick movement.
- README.md: A summary for the EVRA_Locomotion sub-package
- Materials/: The materials used by this sub-package.
- Prefabs/: Prefabs created as either examples or convenient usage in Unity.
- Scripts/: Scripts used in this sub-package.
- Deprecated/: All deprecated scripts, prefabs, materials, and scenes that came with previous versions of this sub-package.
- SampleScenes/: Sample Unity scenes as examples of how to use the EasierVRAssets package.
This sub-package relies on the use of layers and physics to enable unique interactions with the EasierVRAssets components.
In order to enable this to work, you must add perform the following:
- Add a new "EasierVRAssets" layer via the Inspector:
- Click on any object currently in the scene's hierarchy.
- On the top-right, click the "Layer" dropdown.
- Select "Add Layer..."
- Add a new layer named "EasierVRAssets".
- Modify Collision Physics via the project's Collision Matrix:
- Edit --> Project Settings --> Physics
- Disable all collision with the "EasierVRAssets" layer except for itself. In other words, let objects on the "EasierVRAssets" layer collide only with other objects on the "EasierVRAssets" layer.
For more information on how to utilize these subpackages, please read their respective README.md files. Each subpackage in this repo contains a README file that explains the nuances of each subpackage, including how they work and what public variables are most important when integrating these packages and prefabs into your own project.
Happy hunting! - Ryan Kim