[Unity VR Development] Configure with VRTK4.0

Prelude to VR development:

I used VRTK3 version for VR development before. Later, the company’s Unity version was gradually upgraded, and the old version could not be compatible with Unity. This led to a large number of error reports after importing the package. The VRTK4.0 version upgrade, importing the package through the registry, slowly began to be compatible with the higher version of Unity, and the 4.0 version re-architected, and through the development of the module, it feels a bit interesting. Today we will start a simple study of VRTK4.0. use.

Official website: https://www.vrtk.io

Applicable Unity version: 2019.4.28 or above

The version I use here is Unity2019.4.22f1cl version


1. Enable the VR function:

首先我们创建一个新的工程,然后需要先启用Unity的VR功能,这里会There are two cases, the unity version is 2019.x and the unity version is 2020.x and above.

  • If you use the unity2019.x version, check Virtual Reality Supported under Edit-Project Setting-Player, it will freeze for a while, wait and don't click.

  • If you use unity2020.x and above, you will not find this option. After my own test, I can download SteamVR from the Asset Store, and after installing and importing, the headset can also be used normally.


2. Import the Tilia package:

2.1 Configure registry

Enter the official website of the new version of VRTK, click visit tilia packages, and find the registry information .

 Unity opens Edit - Project Setting -  Package  Manager and fills in the registry information.
Note that this function is not available in lower Unity versions. The unity version used by the official website project is 2019.4.28. I am using version 2019.4.22f1c1 here, and this version and above can be used.

 2.1 Import resource pack

By modifying the manifest.json file under the Packages folder to import the resource package of each module, first find this file.
Right-click Show in Explorer in the Packages folder, open the Packages folder, find manifest.json, and open it with Notepad.

 

 Enter the official website to find the official project project. Click visit github to enter GitHub and find VRTK.

 Open the manifest.json file under Packages.

 Copy down the part prefixed with io.extendreality .

 Paste it into the previous manifest.json file, save it, and return to Unity to wait for the resource pack import to complete.

Finally, the Assets window in the project will look like the following interface:


Guess you like

Origin blog.csdn.net/LiKe11807/article/details/128826722