Skip to content

Building, Installing, Running, Debugging, and Streaming

Jasmine Mai edited this page Aug 31, 2020 · 3 revisions

How to build and install

  1. Go to File -> Build Settings. Make sure you are on the Android Platform. Click Player Settings.
  2. Make sure your Company Name at the top of the window is the same as the package name under Identification in Other Settings. The Product Name is the name that you will see in the headset when you look for your build.
  3. Make sure the proper XR plugin management is installed. Go to Edit -> Project Settings -> XR Plug-in Management and click install if it isn't already. Then check the Oculus box to install Oculus utilities. On the left sidebar select Oculus' under XR Plug-in Managementand checkV2 Signing (Quest)`
  4. After the file has built, open command prompt and make sure you are in the directory where your built apk is. Connect the Oculus Quest headset to your computer. Run adb install -r {replace apk file name here}

Note: Make sure your build settings are properly configured by following this page.

Running

  1. Put the Oculus Quest headset on. Make sure it is in developer mode and that it is the one you have installed your build on.
  2. Create a guardian. Then, at the bottom navigation bar, click library. On the left panel, click unknown sources and your build should show up there, with the name that you had as the Product Name.
  3. Click your build. This will run it.

Debugging

  • You can run adb logcat -s VrApi on your computer while the Quest is connected to the computer to get information like FPS, etc.
  • Run adb logcat -s Unity ActivityManager PackageManager dalvikvm DEBUG > out.txt to output Unity logs to a file called out.txt.
  • Follow this link: https://developer.oculus.com/documentation/unity/unity-sf-debugui/ to use the debug UI that Oculus provides
  • It can be really helpful to just run your app in the editor when you are having trouble debugging using the Oculus Quest.
  • For performance issues, try using the Unity Profiler (shows you CPU and GPU spikes and render times) and Frame Debugger (shows you the order of things rendered and how many batches you have).

Streaming

  • Follow this link to download stream the Quest to your computer.
  • Use scrcpy -b 25M --crop 1440:1540:60:60 to crop the video steam to only one eye.
  • If you get an error that looks like this
    INFO: scrcpy 1.14 <https://github.com/Genymobile/scrcpy>
    adb: error: failed to get feature set: more than one device/emulator
    ERROR: "adb push" returned with value 1
    Press any key to continue...
    
    Run adb kill-server then scrcpy -b 25M --crop 1440:1540:60:60 (however you are cropping the video feed) again.