DEV Community

Cover image for 5 Tips for Unity Beginners
Nick Coamey
Nick Coamey

Posted on

5 Tips for Unity Beginners

Unity is a hefty engine with great power, and with it comes a steep learning curve. Here are a set of 5 tips to help you catch on to Unity faster and get you to the fun stuff; making games.

Github And Version Control

As a beginner you are likely working alone, however this is by no means any excuse to avoid version control. Its benefits are numerous including reverting to more stable builds for play testing or collaborating on specific features apart from the entire codebase.

On my first attempt at my Fishing simulator game I made the mistake of setting up a repo after the fact, causing a migraine and a half of refactoring folder structures. It’s best to set up your repository first so future updates are seamlessly committed.

Don’t forget that GitIgnore > Unity command when initializing the repository, it will ignore tens of thousands of engine files that are not necessary.

Customize Your Interface

Unity, like many feature rich production tools, comes with a drag and drop interface. I highly recommend setting a load out that is comfy to how you like to work.

You can create your own custom split and even save the layout in Unity for future projects and scenes.

This will also get you consciously thinking about your workspace and what each window is responsible for.

I like a left to right set up so I have my Game and Preview screen on top of the console on the left hand side and the inspector, canvas, and hierarchy on the right hand side.

Folders

A solid foundational folder structure will do wonders for project organization.

Unity comes built in with an Assets folder but I like to extend this folder with my own set for UI, Logic Scripts, Art Assets such as sprites or custom art as well as mesh materials and Sound for music and sound effects.

This practice will also be important for working with larger teams if your career advances so best to get it down now.

Connecting Scripts and Components

One common pitfall for beginners is misunderstanding how to link scripts into the game assets.

It may seem as simple as attaching the script to the button however you need a game component to hold the script which the button will then activate. Think of it like the script sitting out in space alone and it needs a planet to land on.

Another confusing thing for beginners in Unity is matching the Interface with the Scripting process.

It is common to find yourself confused why game components are not actually being called correctly from their script values. You will need to connect the components to those input fields for them to work.

Namespaces

Another technical leap beginners in Unity have to make is dealing with C# WITHIN the Unity Engine namespace.

Standard C# Objects like Math will often have a Unity Namespace equivalent for instance UnityEngine.Random.Range will be what you call to generate random integers within a range.

It is valuable to keep this in mind especially if you are navigating from a pure C# development environment to the Unity game engine.

So there you have it, five simple tips that can make getting adjusted to the Unity game engine a tad bit more comfortable!

Happy development!

Top comments (0)