If you want to make a game and don’t know where to start, you are in the right place. I will teach you how to use Unity, code in C# and share essential tips and tricks to make your first game.
If you want to make a game and don’t know where to start, I think you are in the right place. I will teach you how to use Unity, code in C# and some tips and tricks to make your first game.
About this Course
This Unity course is for beginners. You don’t need any experience in game development to follow this series. It is a step-by-step course with videos and texts. You can download the game here.
You will learn:
A fully playable character
Heart and score
What is Unity?
Unity is a cross-platform game engine with a built-in Integrated Development Environment (IDE) by Unity Technologies. It is used to develop video games for web plugins, desktop platforms, consoles and mobile devices.
Why should I use Unity?
Unity is like a huge toolbox for developers. It comes with almost everything that you need to build a game. Indie developers or developers who wants to make a game with a low budget or no budget at all can finally use the same tools as any big game companies. They have an amazing Assets Store where you can find thousands of assets and extensions from the community. Unity is also compatible with Android, iOS, Windows, Mac, Playstation, Xbox, Wii and Web Browser. It is still expending. While coding, Unity has the ability to preview the game live. This allows quick testing, prototyping and balancing while the game is being built. The best part of Unity is … IT IS FREE !
Install Unity Hub
The very first step is to install Unity Hub. This application will help you download Unity, manage your Unity projects and update the software. Download Unity Hub here. When it is done downloading, create an account.
In Unity Hub, click on the Installs tab. Then, click on the Official Releases. I would recommend to always download the latest version of Unity that is not on beta.
To create your first project, click on the New button next to Account. Name your project and change the template to 2D. When you are done with the settings, click Create project.
The Unity interface might look pretty scary at first, but we will go through it together. At the top-right, you can choose the layout of your choice but if you want the same as mine, choose the default one.
Unity interface is separated into different panels. Those are the different panels.
The toolbar allows you to use the tools, play/pause the game and some settings.
This panel is the layout of your game objects in the scene.
This scene gives you the view of the edit mode of the game.
This scene gives you the view of the game from the camera’s perspective.
The inspector allows you to change the settings of each game objects. You can also add/remove components.
This panel contains all the files of your projects.
The console shows errors, it will help you a lot for debugging.
You can download the assets folder here. To import the assets folder in your game, drag and drop the folder in the Project Panel.
Preview of the Game
Now, it’s time to preview the game. Drag and drop one of the image from the assets folder in the Hierarchy Panel. You will see the asset showing on the Scene Panel. The Scene Panel is your editor. At the top of this panel, you can see a tab Game, drag and drop this tab next to the scene. The Game Panel is the look of your game from the camera, if you move the asset inside the scene, it will also move in the game panel. At the top of the game panel, change the resolution aspect ratio. Create a new resolution ( 1920/1080 ).
A workflow consist of multiple steps that helps you get your work done. When making a game, you need to be really well organized. This is my workflow.
Take a few hours to think about the theme, concept, ideas …
Just Design It! I use Sketch to do my assets.
Implementation & Code
Unfortunately, we won’t touch coding now but, we will download what we need for it. To edit the code, we need a code editor. You can use the one that you are most comfortable with. I will use Visual Studio Code. It’s currently the best code editor on the market because of its extensive list of features and extensions.
The default code editor of Unity is Visual Studio Community which resembles Visual Studio Code but the logo is purple. You can download Visual Studio Code here. To change the code editor, go to the Unity preferences at the top-left. Choose the External Tools and select Visual Studio Code for the External Script Editor. That way, every time you want to code, it will open the right application.
The extensions in VSC are really powerful and helps your workflow. This is a list of the extensions that I use:
C# by Microsoft C# is the language used in Unity.
C# FixFormat by Leopotam This extension will help you format our code, really nice to have for beginners.
Debugger for Unity by Unity Technologies It will help you debug your Unity project.
eppz! by eppz! This extension will highlight the code with different colors so it helps you visually distinct Unity classes and types.
Unity Code Snippets by Kleber Silva This extension allows you to code faster.