DEV Community

Cover image for Unity and Me: A comprehensive guide to getting started with the Unity Game Developer.
Ryan Ramirez
Ryan Ramirez

Posted on

Unity and Me: A comprehensive guide to getting started with the Unity Game Developer.

Unity is one of the most popular game engines in the world, people love it for its ease of use and versatility. Not to mention its massive community of developers and support for the program. Whether you want to make a 2D platformer, 3D shooter, or even a VR game; Unity enables you to do it. This starter guide will be your light in the dark, helping you get familiarized with the Unity environment by setting up a simple scene to kickstart your game development journey.

Let’s start with the basics though…

What is Unity?

In short, Unity is a game development platform that allows creators to design and build games or even interactive experiences. Using a combination of visual editing tools and programming (using C#), the platform gives developers control over how their games behave.

Let’s look at some keywords / key components that are commonplace in the Unity workspace.

Key Words/Components:

Scene - A scene is basically the level or section of your game where you build out your game world.
GameObjects - These are our building blocks, everything in unity is a gameObject whether that means a character, a light source, or even an invisible trigger.
Components - These help add functionality to your gameObjects, like RigidBody to add physics, and Light components to emit light, even sound components that are triggered on an action!
Assets - Assets are files that you import into your game, things like models, textures, sounds, and scripts.
Inspector Window - This is where you can modify the properties of existing GameObjects and their components, it’s an essential window!
Hierarchy Window - This window displays all your gameObjects in the current scene, some objects can be grouped within each other; thus giving the name.
Project Window - This is where you’ll see all the files and assets available for your project.
Play Mode - A mode that allows the developers to test their games directly in the editor!

Now I know that was a lot, but it’s just to get you familiarized with some of these terms. Don’t worry about memorizing them just yet. Instead, we’ll set up a basic unity project together!


Setting up your first Project

Step 1: Download and Install Unity

You can’t get started without the platform itself! Head to Unity’s website and follow these steps:
1. Install Unity Hub - The central app to manage all your Unity Projects, installations, and licenses.
2. Install a Unity Version - Once the Hub is installed, open it up and head to your ‘installs’ tab on the left-hand side. Click ‘Add’ to install a Unity Version, and make sure to choose LTS (Long Term Support).
3. Create Your First Project - Now head to the projects tab and click ‘New’. Select ‘3D(core)’ to start your first 3D project! We won’t worry about 2D for now.

Step 2: Get Familiar with the Editor

Once your project is created, Unity Editor will open, it may take some time so give it a moment! When it does open. You’ll see this:

  • The Scene View: AKA Your Main Window. This is where you build and arrange your world. For basic maneuvering through this window, hold right-click and use WASD and Q and E to move around in any direction like a fly!
  • The Game View: Activated when the play button on the top middle of your screen is hit, this changes the scene view into a live version of you how your players will see the game, with full player controls!
  • The Hierarchy Window: We mentioned this one in key components! On the left-hand side, it shows you all the game objects in your scene.
  • The Inspector Window: Also in key components and on the right-hand side, allows us to edit gameObjects properties and components
  • The Project Window: Located at the bottom, displays assets available for use

Click around and get comfortable with the layout. You can always reset the windows to the original layout by going to Window > Layouts > Default.

Step 3: Maneuvering and manipulating the Scene View.

Maneuvering Scenes - Now lets look into actually moving in our scene, this short list will tell you the controls to maneuver the Scene View and move to get a better look at your game's scenes and objects.

  • Right Mouse Button (RMB) + Move Mouse → Lets you look around without moving
  • Middle Mouse Button (MMB) + Move Mouse → Pans left, right, up, and down the scene
  • Scroll Wheel → Zoom in/out
  • WASD (while holding RMB) → Lets you fly around like in minecraft!
  • Q / E → Move Down / Up > Pro tip: You can change the camera gameObject to your current view by clicking it and pressing Ctrl+Shift+F! (Cmd on Mac)

Manipulating Objects - With almost any gameObject, you may want to change its size, shape, and orientation to better suit your game. To do this, there are a few simple controls that are important to memorize, with these in your tool belt you can manipulate any and every gameObject you will ever interact with!

  • W → Move (Arrows appear)
  • E → Rotate (Spherical handles appear)
  • R → Scale (Box handles appear)
  • V (Vertex Snap) → Snap object to another object's vertex
  • Ctrl (Cmd on Mac) + Move → Snap movement

Pro tip 2: You can immediately center in on any gameObject by double-clicking it in the Hierarchy Window!

Take a moment here to learn your preferred method of maneuvering the scene. It takes some getting used to, so take your time!

Once you're done, you can now say you have a unity project set up, feel comfortable with the layout of windows, and can confidently move around your scene. Now let’s get right into building something!


Creating a Basic Environment

We’ll start by creating a simple environment with a ground, some objects, and a light source. This will act as the foundation for your game!

Step 1: Create the Ground

Add a Plane: In the hierarchy window, right-click and empty space and choose 3D Object > Plane. This will create a flat surface that we can use as our ground.
Position Plane: In the inspector window, ensure the plane is at position (0,0,0).This ensures our ground is in the center of the scene.
Scale the Plane: In the inspector again, adjust our scale to make the plane large. Try (10,1,10) for now.

Step 2: Add a Light Source

Add a Directional Light: In the hierarchy, right-click and choose Light > Directional Light. This will simulate sunlight in your scene.
Adjust Light: In the inspector window, change the angle of the shadows by changing Rotation X to 50 and Rotation Y to 30.

Step 3: Add some Objects!

Add a cube: In the Hierarchy, right-click and choose 3D Object > Cube. This will add a cube to your scene.
Position the Cube: Set the cube’s position to (0, 1, 0) so it sits on the ground and doesn’t just float!
Duplicate it!: Select the cube in the hierarchy window and press Ctrl+D(or Cmd+D on Mac) to duplicate the object as needed!
Get Creative!: Now that you have a few cubes, lets get creative! Select each of your cubes and use the Scale property to mess with your cube's size to get some unique block shapes! You can also press the shortcut R to do this in the scene view!

Step 4: Add some materials!

Create a New Material: In your project window, right-click an empty spot and create a folder called “MyMaterials”, this is where we’ll keep all our custom-made materials. Now inside this folder, right-click again and choose Create > Material. Name it "GroundMaterial."
Customize the Material: Select the material from your project window and locate it’s properties in the inspector window. Here you can change its color and some other properties like whether or not it is metallic. Explore and have some fun making your own material!
Apply the Material: Drag the material from your project window straight onto one of your game objects. Notice how it now has the same surface as your material!

Nice Work! If you followed all these instructions, you should have a basic scene and some knowledge of how to navigate the Unity Editor platform. Spend some time messing around, creating different objects and learning their properties and how they work. Create a small scene for yourself!


Saving Your Work

Now let’s make sure we save everything.

Unity saves Scenes and assets separately, so make sure you save both!
Go to File > Save to save your Scene.
Go to File > Save Project to save your project assets.


Next Steps

Now that you have a basic environment you can say you built all by yourself, what comes next? Well, there is still so much more Unity has to offer! Our next post will cover adding features like:

Player Controllers: Using C# to make our GameObjects move!
Physics Components: Adding a RigidBody component to allow GameObjects to interact with gravity and collisions!
Script Writing: We’ll explore Visual Studio IDE, unity’s go to code editor for creating scripts.

Until then, have fun creating whatever scenes you’d like and exploring what other shapes and objects you can add to your scene!

Top comments (0)