Unity is an all-purpose game engine that supports both 2D and 3D graphics, as well as scripting through C#, and the drag and drop functionality. Developed by Unity technologies, it’s by far the most popular game engine on the block today. Its vast suite of built-in features including 3D rendering, physics, and collision detection help Unity seal its reputation as a formidable tool, making it the preferred choice of developers in the process.
Despite its convenience, however, beginners often have a hard time selecting a project with which to set sail on their Unity journeys. If that’s the case with you as well, then this video — The Complete Unity Guide 3D- Beginner to RPG Game Dev in C# by Eincode — is just what you need. This all-new video lecture discusses and demonstrates in detail the process of building a simple pickup system from scratch. You’re advised to code along with the video to acquire a greater grip on the following discussion.
In this article, we’ll discuss the working of a pickup system wherein the player will interact and collect the objects in their vicinity. In the process, we’ll also create an inventory system that stores the details of every collected object. A preliminary demonstration of the game has been done in [0:12] of the video.
At [0:35] of the video, you will be able to notice the presence of a “Use Item” button in the Unity IDE. The purpose of this button is to spawn the items that are collected by the player. Every object that is spawned is subsequently emptied from the inventory. The link to the GitHub repository containing the code for the initial project discussed in this article has been provided in the description of the video. To understand how to go about this, refer to [1:00] of the video. For this project, the code editor we’ll be using is Visual Studio.
Once you download or clone the project from the Github repository, you’ll straight away be transported to the scene of the pickup system. If the scene fails to open from you, then [1:45] of the video discusses an alternative method for accessing the same. Once the scene opens on your Unity IDE, we can proceed with the following steps.
Now that the pickup object has been introduced into the scene, we need to understand how to interact with it. This has been covered in [5:47] of the video. The following points discuss the same.
Next, we’ll talk about how we can create a few fake items that’ll be collected by our player and eventually reflect in their inventory. Section [9:05] of the video covers this in detail.
Now that we have created the items that our player can interact with, we need to create an inventory object that will keep track of each item that our player collects. Section [14:54] of the video talks about this at length. The salient points are listed below.
Once the inventory is created, you need to work on a couple of concluding functionalities to wrap up this project. Watch from [32:08] of the video to acquire an elaborate understanding of the same.
This concludes our discussion of the creation of a simple pickup system using the Unity IDE.
If you found this project interesting and want to work on similar ones in the future then you should consider taking up The Complete Unity Guide 3D- Beginner to RPG Game Dev in C# course offered by Eincode. Curated by experienced software engineer and freelance developer Filip Jerga, this course starts with the fundamentals and progresses gradually to eventually take its subscribers through the journey of developing their own RPG game by using Unity 2020 and C#.