Jump to content
Happy Holidays! Limited Staff Responses: 1/20 - 1/31 ×

[Tutorial] Getting started with development on Vive platforms


Alex_HTC
 Share

Recommended Posts

You can quickly get started with Android based VIVE platforms. By integrating with our Wave sdk, you can support all mobile Android (AIO) devices and we will be showing step by-step instructions on how to quickly get development rolling.

1) Install a LTS version of unity
Download and install unity hub https://unity3d.com/get-unity/download .

a) After installing, switch to the "installs" tab of the unity editor

1947236769_unityhubinstalleditor.thumb.png.c6fb62433a9e8604cd167836ec69ae4f.png

b) Click the "Install Editor" button
1979370275_unityhubinstalleditor_listing.thumb.png.20ab0b183222283a5eb909761cc73189.png

c) When installing, make sure to install the modules windows, android, "Android build support", "Android SDK&NDK tools", "OpenJDK", which are needed to create builds for the platforms that vive runs on.
217573528_unityhubinstalleditorwithmodules.thumb.png.305776df07c7e67bcace745e28ec0f7f.png





2) Create a new project using the "VR template"

 

a) Select "New project"
1550989790_unityhubnewprojectvrtemplate.thumb.png.d9aaeef7a095539140b207a9949b880c.png
 

b) 
Select the "VR Template", hitting the "Download template" first if that button shows up, like it does below
select_vr_template.thumb.png.bd96ca7e82e2dc16226d1e3488450258.png

b) Create the project, give it a "Project name" and path that you can find again later. 
Here, I'll be calling my Project "Hello VR" 🙂
Then click the "Create project" button
487171208_unityhubnewprojectcreation.thumb.png.20f5e751e128d99520450158b28d49a0.png





3) Connect your project to the VIVE ecosystem!
a) Open the Package manager, by selecting "Window->Package Manager"
open_package_manager_window.png.9ad1400c9709f0da8f8c2bade26ace0f.png

b) Select the gear icon, here circled in red
gear_icon_to_open_advanced_project_settings_inked.thumb.jpg.44927928936d772230d12745b1f55598.jpg
c) Fill in a new entry for VIVE in the "Package Manager Settings" and hit save
Name: Vive
URL: https://npm-registry.vive.com/
Scope(s): com.htc.upm
add_vive_to_scoped_registry.thumb.png.ca4f9f3ce133bedbbbf23df9c43ebd14.png

d) Switch back to the package manger tab and select the new entry "My Registries"
package_manager_my_registries.thumb.png.023c716ea0f7b1c6e9bbadb5e17a9e2c.png

e) Install the "Vive Wave XR Plugin" by selecting "Vive Wave XR Plugin" entry, and selecting the "Install" button in the lower right of the panel
package_manager_wave_xr_plugin.thumb.png.32a5fd3522e714642b7080e533a9a50a.png





4) Enable the wave xr plugin

a) open "Project Settings" tab, select "XR Plug-In Management" , then select the android tab underneath the text "XR Plug-in Management"
xr_plugin_management.thumb.png.70fc68ae813e802f93420e04144c108e.png
 

 

 


5) Set up the Android Manifest to finish configuration

a) Select the menu option "Project settings->Wave XR" and open the "PlayerSettings Configure Dialog"

wavexr_configure_dialog.thumb.png.afa0ddcd75ff1c682518bdf592b75a2f.png

b) A new popup window should be showing. Click "Accept all" to set up your project correctly for the app

wavexr_configure_dialog_window.thumb.png.32d82611c01e7e2d7726f71f80aeff7d.png



c) Wait until you see the confirmation dialog 


wavexr_configure_dialog_window_finished.thumb.png.7f3070a895505ae8b5fba2d832829666.png


5) Set up the Android Manifest for your project. This configures the app and is a critical step to ensuring that the program works as expected

a) Download the file linked here
AndroidManifest.xml

b) Copy the file to a new directory in your project "Plugins/Android", so that the file lives in your project at the path "Plugins/Android/AndroidManifest.xml"
In your "Project tab" it should appear like the image below
Androidmanifest_file_location.thumb.png.408f34dd4c7f094e73f8c954e1ee2580.png

c) Enable a custom android manifest in your "Player Settings" tab, under android.
The player settings tab can be found by selecting "build settings" then selecting the "Player settings" button and the "Publishing Settings" sub tab (there are a lot of settings, so you may need to scroll down)

AndroidManifest_Custom_Main_Manifest.thumb.png.b96260d53b39c95093308cfec0b68e08.png

 

 


6) Add the sample scene to your project. 


a) Open the "Build" window, by selecting "File->Build Settings"
add_sample_scene_to_build_settings.thumb.png.93c5b4e7a800382ae21c6d4688175ad8.png

 


b) In the project view, find the "Sample Scene" and drag it on to the "Scenes in build" section of the "Build Settings" Window, so that it shows up like this:
add_sample_scene_to_build_settings_expected.thumb.png.d06269951762c8b70caba1aa5d860669.png

7) Run the app!


a)  In the headset, go to settings->Advanced and enable "USB Debugging" and "Install Unknown apps"
Enable_USB_Debugging.thumb.png.9a8ba22883c8111f4bbf27ac4abe0627.png


b) Connect your focus3 to the pc running unity with a usb cable, accept permissions if a dialog comes up

 

c) Inside of unity's build window, select "Build and run" to build the app and show it in your device!
add_sample_scene_to_build_settings_expected.thumb.png.c9eee429f712388480fd9bb86609bf9e.png
 

name the build
name_for_specific_build.thumb.png.90f4bf540ec0c193123924d272284731.png

Wait for build
wait_for_build.png.35909d8ab10d53c4437d07425d87e323.png

😎 Enjoy the developing for VR!

If you want to compare what you have against a finished version of the tutorial, the project is also available here:
https://github.com/hardcoded2/HelloVR

And if you just want to compare your build against an official one, this is a copy of the apk, which can be installed using adb ( https://techcult.com/install-apk-using-adb-commands/ )
com_defaultCompany_hellovr112020_3_30f1.apk

 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...