Project 1: Engine Basics Teachback

by Andrew Long on ⌜Sep 25, 2022⌟

Tags: #VRT310, #Unity, #Game Programming

The Basic Setup of Unity VR on Linux

Getting Unity up and running on Linux is incredibly easy. To start, we’ll install Unity Hub & Unity. Next, we’ll import libraries and settings for VR. After that, we’ll import an art asset into our scene. Lastly, we’ll import & activate VR controls which will allow the player to look around our scene. So let’s get started!

Installing Unity on Linux:

To start, you’ll want to install Unity Hub. It can be installed in a few ways. You can run the Unity Hub from an appimage by going to Unity3D.com, clicking download Unity Hub, then running:

./unityhub.appimage in the directory of the appimage.

The other way of installing Unity Hub is through a package manager.

On Ubuntu run this line to add the Unity Hub repository:

$ sudo sh -c 'echo "deb https://hub.unity3d.com/linux/repos/deb stable main" \ 
    > /etc/apt/sources.list.d/unityhub.list'

then, add the public key with:

$ wget -qO - https://hub.unity3d.com/linux/keys/public | sudo apt-key add -

now, update your package cache and install the package:

$ sudo apt update
$ sudo apt-get install unityhub

If you are on any other Linux distro besides Debian based ones, refer to the Unity3D docs.

Creating a new project:

It’s super simple to create a new project in Unity. Open the Unity Hub and under the projects tab on the left side, click the blue “New Project” button.

Once your in the New project dialog, scroll down to VR and click on it, click “Download template”, change the project name, and finally, click the “Create project” button!

Importing assets into your project:

Importing assets into your project is also incredibly easy. To start make a folder for your textures named Textures. Then, get the texture you want to import and drag it into the newly created folder.

The texture I’ll be importing is one that I made a while ago. The texture is one of the tiles in my old dorm room.


When following the instructions above I get this:

Our texture was successfully imported into Unity!

Now, to use it, drag it onto the “plane” object in either the heirarchy or scene window.

Then you get:

Our imported texture is now applied to the plane! To get modify how it looks on the plane, select the plane object. Then in the inspector window, click on the material drop down.

Conclusion:

After all of that, You should be able to mess around with VR development in Unity. If you have any issues my contact information is in the about section of this website.