Introduction to and setup of Unity and VRCSDK
Have you ever wanted to make your own VRChat world but never knew how to start?
In this tutorial series I will show how to create your very own room from start to finish.
This will be a series accessible to everyone, including those who have never touched 3D before. We will only be using one software: Unity; this way, you will be able to create worlds fast and efficiently.
This is a beginner course that covers everything one should need to know when building a world, including best pra ctices that will lead to higher framerates, lower world sizes and faster iteration.
In this first tutorial, you will learn how to install Unity, navigate the interface, import the VRChat SDK and test a world! Don’t worry, it won’t be finished yet, we just need to make sure that everything works properly before we make a huge time investment! Oh, and you need to have a VRChat account of at least New User rank, the blue one, otherwise you won’t be able to upload anything!
First, you will need to go to the following link https://docs.vrchat.com/docs/current-unity-version in the description to download the latest version of Unity that VRChat uses. You must be using this exact version or it will not work! (As of recording, note at the bottom that VRChat only supports using Unity on Windows 10 PCs) First, install the Unity Hub as it will be useful in managing multiple Unity versions and platforms; this way, we can easily upload to PC and Quest and upgrade our Unity version when VRChat does. After installing the Unity Hub, click on the link on the VRChat documentation webpage to install the current Unity version. When installing, make sure to check Android Build Support as this will allow us to also upload for Quest.
Once that is installed, open the Unity Hub and click New at the top right. Name your project, select a location, select the 3D template and hit create! Tip: I recommend putting all of your VRChat Unity projects in a folder on your larger hard drive if you have multiple, they can get pretty big!
Once all that is finished, Unity will take a bit to set everything up and then it will open! You should now see the default layout of Unity when you first create a project.
If you want to change Unity to dark mode, you can go to Edit>Preferences>General>Editor Theme.
The largest and most prominent window is the scene view; this is a 3D view of your Unity scene. You can use the mouse wheel to zoom in and out. You can use the middle mouse button to pan (or press Q to use the left mouse button instead), and if you hold ALT and left click you can pivot. You can look around by holding the right mouse button and moving your mouse, and while holding, you can also navigate the scene by using the WASD keys, as well as E and Q for ascending and descending.
There should be two objects in the default scene. You can see them in the Hierarchy tab, which is on the left side of the screen by default. If you click on the Main Camera, it will highlight in the editor, a 3-axis gizmo will appear on the object in the scene tab, and information will appear in the rightmost tab, the Inspector. The inspector shows all the information of an object, and each collapsable section is called a component. Every object will have a transform component, which denotes its X Y and Z position, rotation and scale. If you edit the value in the Inspector, the object updates in the Scene view, and vice versa.
You can rearrange these panels however you want. For the sake of conformity and ease of learning, I will be keeping the default layout for this series unless I explicitly open a new tab required for the course, which I will make clear. If you ever want to reset to the default layout, you can simply click the dropdown in the top right corner which should say Layout and select Default, or Window>Layouts>Default.
OK, for the rest of this lesson, we will set up a test scene to ensure that it is possible to upload working worlds to VRChat. First, we need to add a ground plane for the player to stand on. To add an object, go to the Hierarchy, right click and select 3D object>Plane (alternatively you can use the GameObject menu up top). Press F in the Scene tab with the object selected to snap to it. By default, there should be a gizmo on it in the center of the object that has 3 arrows; you can change between the gizmos with the keys W, E, R, T and Y. We want this plane to be in the center of our scene, also called the origin. To do this, make sure the plane is selected, go to the Inspector, and under the Transform component, click the 3 vertical dots, and click reset. This will reset the XYZ position and rotation of the object to 0,0,0 and the scale to 1,1,1.
Now, we need to import the VRChat SDK, which is a Unitypackage. First you must download the SDK3 - Worlds from https://vrchat.com/home/download. To import a package, go to Assets>Import Package>Custom Package... or simply drag in the package file from the file explorer. After some processing, you will see a popup; this lists all of the assets in the package, and will come up every time you want to import one. By default, everything not already imported into the project will be checked; this is what we want, so just click import.
After the package has been imported you should see there is a new menu in the menu bar called VRChat SDK. Before touching that go to the search bar in the Project tab and type “VRCWorld”. Drag VRCWorld.prefab into the Hierarchy and reset the transform to the world origin if it isn’t there already.
Now, go to VRChat SDK>Show Control Panel, and a new window should pop up, which you can dock if you like. Login and then select the build tab. Click the buttons to setup layers and set the collision matrix. Under Local Testing, check force non VR. VRChat should launch, and if everything goes well then you should spawn in the scene on top of the plane!
I would recommend closing the VRCSDK window when not in use, as it can slow Unity down. If the window is undocked, you can close it by clicking the x at the top right corner, or you can right click on the tab and select Close Tab.
Before the next lesson, there are a few other things we need to import into our project. The first are two packages that will greatly enhance our workflow. The first is CyanEmu https://github.com/CyanLaser/CyanEmu/releases/latest, and it allows us to test our world by clicking the play button at the top of the screen; that way, we don’t have to launch VRChat every time we want to test, leading to much faster iteration. The second is VRWorldToolkit https://github.com/oneVR/VRWorldToolkit/releases/latest, which gives us a bunch of tools to help make our world more optimized and ensure it isn’t broken.
The final two things we need to install are some prebuilt packages. To make our room we will be using Probuilder, which is a 3D modeler inside Unity. To install it, go to Window>Package Manager, and at the top of the new window, under Advanced, ensure that Show Preview Packages is checked, then search for Probuilder and click install. After that, search for Progrids, and install that too. Progrids works in tandem with Probuilder and will snap our objects to an easily modifiable grid.
That’s it for this lesson, in the next one we will start building our room!