Getting started with Unity3D

Akshansh Bhanjana
11 min readAug 22, 2019

--

It might seem intimidating with the 3D at the end, but trust me, it isn’t. If you’re reading this you probably already know what Unity is, and I promise that this is probably the only jargon you’d come through in this post. Let’s dive right into it!

Setting up Unity

The first thing you’ll need is a working computer (Windows/macOS, either would work). Unity is currently not available on Linux, so you might need to switch to Windows/macOS if you’re a Linux user. In this post, I’ll be demonstrating this process on a Windows machine.

Requirements (recommended)

  • Processor — Intel Core i5 (5th Gen or better) @ 3GHz / AMD FX-8350 @ 4GHz or better
  • Graphics — NVIDIA GTX 960 or better / AMD Radeon RX 560 or better (3GB VRAM)
  • RAM — 8GB
  • Disk Space — 15GB

It’s not that Unity won’t work on PCs not satisfying the abovementioned requirements, but again, having these would make the experience smoother.

Also, I suggest you get a mouse for working with Unity. Again, it isn’t necessary, but it will make your work much easier.

Alright then, let’s get started.

Downloads

  • Download the Unity installer (Unity Hub) from here
  • Download Android Studio from here
  • Download JDK (Java Development Kit) from here
  • Download JRE (Java Runtime Environment) from here (you might need to create a new account)

(Note: Be sure to download the Windows versions of the JDK and JRE, preferably .exe)

Installing JDK

Open the JDK installer. You’ll see something like this:

Click Next. Select the installation directory in the next step, and let it install.

Installing JRE

Open the JRE installer. You should see something like this:

Click Install. Don’t worry about changing the destination folder (unless you explicitly want to). Also, I only get the Remove option because I already have JRE installed. Don’t worry if you don’t see it on your machine.

Let the installation finish.

(Note: If you see a message asking you to uninstall an older version of JRE, do it.)

Installing Android Studio

This process is kinda long and boring, so feel free to take a break anytime you want. Alright then, let’s open up the Android Studio installer. It is recommended that you close all other applications before starting the installation to speed up the process.

Click Next. You’d see something like this:

You won’t need an Android Virtual Device to run Unity, and thus it is an optional install. Press Next. Select your installation location in the next step, and press Install. Let the installation complete. When finished, check the Start Android Studio option, and click Finish.

You’ll be prompted with the following:

Select the Do not import settings option. A new Android Studio window will open. In the following window, choose Custom.

Select a theme for your Android Studio (doesn’t really matter). In the following window, you will be prompted to install the Android SDK.

Select the first four options (which I already have installed). Change your installation location if you want to, but it is recommended that you let it be. Click Next, and Finish.

Installing Unity (and Visual Studio)

Finally, we’ve installed all the dependencies. Now let’s proceed with the installation of Unity. Open up the UnityHubSetup and set an installation location. Click on Install. Check the Run Unity Hub option and exit.

You’ll see something like this. Click on Add.

In the next window, select a version to install. It is highly recommended that you install the latest LTS version. It was 2018.4.6f1 in my case.

Click on Next. You will then be asked to add some modules to Unity. Select the following:

Select Android Build Support and Vuforia Augmented Reality Support

(Note: If you do not have any IDE/Text Editor, you should check the first option (Microsoft Visual Studio) as well. I personally use VSCode, and so I will not install it.)

(Note: You will not need Vuforia Augmented Reality Support to complete this tutorial, however, it might prove useful in the future (when you actually learn AR))

Click Done. Let the installation finish. After the installation has completed, close Unity Hub.

Congratulations! You have successfully set up Unity on your machine!

Let’s get on with creating some cool 3D models!

Creating your first 3D models

So now that we have everything ready, let’s get on with creating some actual 3D models. Open up Unity. On the startup screen, click on New.

Click on New, as illustrated

Don’t worry if your On Disk tab is empty, it’s about to get filled real soon :)

Fill in all the required details, and click on Create project. If you’re not sure of what all to select, here’s a glimpse of what you need to do:

Click on Create project, as illustrated

It will take some time (just like all good things do). Once you have a new Unity window up, you can start experimenting!

Getting familiar with the windows

You might be overwhelmed with the Unity window you see, but don’t worry, all the tools you see here are gonna prove really useful in the future. Here’s what you should be seeing:

The window in the middle is called the Scene and is where you will be able to see all the 3D models that you create.

Notice the sun-like and camera-like objects already inside the Scene. These are called Gizmos (I know I said no more jargon, but… I lied). You can change the position and angle of these two objects (and even remove them!) in order to see your Scene in a different light (using the sun object)/from a different perspective (using the camera object).

The window at the left is the Hierarchy of your project. Hierarchy here means the same as it does in English. You will be able to set the priority of various objects, add or remove objects, and create children or parents of objects (and hence the name, Hierarchy). We will discuss this in more detail, so don’t worry if you didn’t understand all (or any) of it.

The window at the bottom is the Project window, which essentially displays the project structure and the components in its directory.

At the right is the Inspector, wherein we will be able to change properties (size, rotation, position, etc) of various objects.

In case you have trouble identifying some windows, here is an overview of the above:

Let’s move further and add some real 3D objects to our Scene.

Adding a Cube

Right-click on the Hierarchy window. From the 3D Objects dropdown, select Cube. Here’s a visual representation of what you need to do:

This will place a Cube at the centre of your Scene. And the centre doesn’t necessarily mean at the centre of your window, but rather at the centre of the cartesian plane (i.e. origin, (0, 0, 0)). You can confirm the following by tapping on the Cube and looking at the Inspector window. Here is a glimpse of the same:

The Transform tab essentially shows the properties of the selected object relating to its Position, Rotation, and Scaling. Its Position is simply its coordinates in the 3D cartesian plane. The Rotation signifies its rotation about every axis. Scale refers to its size (in metres) in the respective axes.

Here’s what a 1x1x1 Cube placed at the origin looks like:

Let’s learn about the Toolbox now.

The Toolbox

This is certainly gonna be one of the most useful tools in all the time that you use Unity. Notice the small icon list at the top left of your Unity window? That is the Toolbox. This:

The tools (from left to right):

  • Hand Tool — This allows you to move through your Scene. Just select this tool and hold and drag you Scene around.
  • Move Tool — This allows you to move your object around in the Scene.
  • Rotate Tool — This allows you to rotate your object about any of the three axes.
  • Scale Tool — This allows you to adjust the size of your object.
  • Rect Tool — This also allows you to adjust the size of your object. More on this later.
  • The Super Tool — The rightmost tool in the Toolbox, this allows you to modify any of the abovementioned properties of an object.

Now that we know about the Toolbox, we can change certain properties of our Cube.

Adjusting object properties

  • Position — To change the position, first select the Position tool from the Toolbox. Now simply hold and drag any of the arrows you see around the Cube. There are 3 arrows, each arrow representing one axis. Suppose you want to move your Cube along the positive Y-axis. Just hold and drag the green arrow up a couple of centimetres.

As you might already have noticed, this is not a good way to adjust the position of your objects, especially if you want to place them at a certain point on your cartesian plane. To make things easier, you can simply set the coordinates of your object in the Inspector window. Let’s say we need to move this Cube to (1, 2, 3). Just set these coordinates in the Transform tab of your Inspector window. Here’s what it looks like:

Notice the coordinates in the Inspector window. Here’s a clearer image:

  • Scaling — To scale your object, just select the Scale tool from the Toolbox, and drag any of the colored boxes (at the end of the colored lines) around the Cube along their respective axes. Again, each box represents one axis. In case you get confused about the axes, you can always cross-check with the compass at the top right, as the colors of the axes correspond to the ones below. Again, as an alternative, you can modify the Scaling of an object from the Transform tab.

The Rotate and Rect tool work in the same way and have been left for you to explore!

Let’s get accustomed to some shortcuts now.

Adjusting your Scene

Here are a few useful controls which will help you better understand and adjust your Scene:

  • Zoom — Scroll up/down to zoom in/out (or pinch to zoom in/out, if your trackpad supports it)
  • Changing your angle— This allows you to adjust your viewing angle, i.e. the angle at which you are looking at the Scene. Hold the right mouse button and move the mouse around to adjust your angle.
  • Changing the Scene angle — This allows you to change the angle at which the plane is aligned. Hold the alt key on your keyboard and move the mouse around to change the Scene angle.
  • Moving the Scene — This allows you to move around the Scene. Hold the middle mouse button (or its equivalent if you’re using a trackpad (both the buttons in my case)) and move your mouse around.

Go on and experiment with your newly learned controls! They will prove really useful in the future.

Tip: In the Hierarchy column, just double-tap on any object and that object will be centered again!

Adding colors

It would be nice if you could change the color of your objects, right? Let’s add color to our Cube.

In the Project window at the bottom, right-click and select Folder from the dropdown. Here’s a visual representation of what you need to do:

Let’s name this folder Colors. Double-tap to open the folder. Here, again, right-click and select Material from the dropdown. Name it to the color you want to create. I’ll be naming it Yellow. Here’s what my Project window looks like:

Now, in the Inspector window, tap the colored box right next to the Albedo property. A new window will open asking you to select the color you want to. Here’s what you need to do:

Tap on the highlighted box
Select the color you want to

Close the Color Selector window now. Now just simply drag and drop the newly created color from the Project window on to the object, as illustrated:

Here is what your Cube should look like, then:

Looks good, doesn’t it? You can experiment with more colors and more such objects, and create complex 3D models!

(Note: You do not need to create a folder named Colors, or any folder for that matter. It is just there to show you that you can create new folders as well, which helps better arrange and store things in your project.)

Conclusion

As of now, you know how to create and edit basic shapes and objects in Unity! You can now create complex objects by joining together a couple of basic ones. I’d love to see your creations in the comments section below!

--

--

Akshansh Bhanjana

Fascinated by most things. Currently exploring Augmented Reality.