How to make a VR game without having a VR device 【Set up】


  When I starting to make a VR game, it's pretty expensive to having a VR device.
  So I found a solution on GitHub: https://github.com/ViveSoftware/ViveInputUtility-Unity
#My PC spec
  Lenovo IdeaPad 310
  CPU:i5-7200U
  RAM:4G+8G
  GPU:GeForce 920MX 2G
*Higher recommend to add your RAM up to 12G, make sure Unity can run smoothly.

#Install Unity
To install Unity, first you need to install Unity hub:
https://unity3d.com/get-unity/download
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/97f4cc12-f6e7-4e6a-517c-d2eca6db7fa6.png)
After you install, it will tell you to set up your License
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/f995ff79-90ac-3ce1-f8e5-fe41e3ad417b.png)
Click the setting button.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/c39999ea-6be5-dfa6-4986-2ee328668e24.png)
Turn to [License Management]
I use the student license here, but I will teach you how to set up a personal license, it work pretty well too.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/182a5ebb-5e30-1393-464c-7457f28d3091.png)
Click [Activate New License]
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/cdae3bb3-f1ad-6faa-998a-af7c95b6489f.png)
Use the personal license, and [Done].

After that we can start install Unity engine.
Go to Unity 2019.2 website: https://unity3d.com/unity/whats-new/2019.2.10
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/11567180-0cb6-1299-47a1-3d53307f4ad2.png)
Download the version of your system version, and install it.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/82a94b41-9798-a947-ffbf-5dd5b1825dc8.png)
You can see the install version on Unity hub, if you install successfully.

#Plug in VR model
Go to GitHub:  https://github.com/ViveSoftware/ViveInputUtility-Unity
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/bac9a212-1c1a-ebf5-7c3a-b47890cc8e62.png)
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/e876acaa-73a5-2ded-971c-db6a04d233b0.png)
Download all the file, and unzip it in other folder.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/6f9228f3-937c-db6f-33df-99a57b420160.png)
Create a new project on unity hub.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/c17e7be2-224c-3a16-0aba-658062c1a9c8.png)
Choose the version we just install.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/dcbb317f-71dd-d8cc-7a94-85be646f8ab0.png)
Choose [3D] and change the project name and location as you want.
*Remember the location! We need to change the file inside later.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/3cc907e5-9a54-aba8-8885-7624a6e6b2b8.png)
Hit [Create].
After you create, it will open Unity automatically.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/3c37cfaf-7843-5c98-4d5a-6144aacccc46.png)
Copy and past everything from [ViveInputUtility-Unity-develop](the GitHub folder) to the project file.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/252ed721-ff83-c24c-f525-bdd69e0163d3.png)
Hit Replace all the file if the system ask.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/55432d82-a16e-5701-553c-bbc0a7555d65.png)
Your project folder will be like this after you past it.
It will run few second when you open the Unity screen.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/019bd132-5de5-4be4-99f1-c406d02084db.png)
Click [Reload].
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/3e40074b-7a0a-2cc1-954a-4747ec3975ca.png)
Click [Accept All]
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/f1fe63fb-1230-3342-695c-5726582d0f2d.png)
There will pop up some error, we will fix it later.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/d996814c-0500-9371-7e89-035019bd8b9a.png)
Click [Edit] and [Project setting]
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/c8d5bdca-a422-3870-f22a-440f7c90d745.png)
Turn to [Player]
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/e13492ee-cd5e-f065-2afa-12f867c97eb0.png)
Open [Virtual Reality Supported]
It will run for few minute.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/77bceef1-49e6-ca8a-dfb8-40f4d87f3f35.png)
Click[Accept All] again.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/500996ee-1176-9343-4cf4-ff2dcfa62e1f.png)
Click [Edit] and [Preferences...]
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/233a359f-97eb-044f-3e95-9198146a0796.png)
Turn to [VUI setting]
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/259c91b4-a599-70c6-075a-f580452c3913.png)
Open [Simulator]

#Install Steam VR(I forget it... Sor...)
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/87c05681-6e46-1d51-4fdb-2bd3e1eb09fe.png)
Download & install Steam: https://store.steampowered.com/about/
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/09b09826-bed3-e1bb-16ae-a45b86dcbe03.png)
Search [steam VR] and install it.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/35bc2d54-edd6-7719-05c1-4afcab70af93.png)
It will run for few minute.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/40e7deb1-a176-53b2-74ad-4f208c5248d0.png)
Open it when you open the project.
#Back to Plug in VR model
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/ec0b37cb-5c86-2bdf-baf2-a547ee3035d3.png)
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/4897e56d-5d99-b77a-0123-1dd9b52b00c8.png)
Open the folder to [Assest>HT![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/19f8364b-3f81-0e82-36e1-c9ac7f3cb33d.png)
C.UnityPlugin>ViveInputUnity>Prefabs]
Pull the [ViveCameraRig] model and [ViveCollider] model into Scene
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/2f678d05-c71e-a740-2099-9402830a3cca.png)
Delete the [MainCamera] model in Scene.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/aac1915b-2092-26d9-3db5-81ca9f10e093.png)
Than VIVE VR plug in without VR device is success!!
Now you can control the VR device by mouse and keyboard!

#Tip
1.Keep steam VR open when you start the project.
2.Check the other camera model only pop on display, not on the same display with the ViveCameraRig.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1088475/c765dff1-f638-b2b6-655c-fac7cb58411d.png)
3.Have fun~~