For our inventory, we'll only use one script, so let's get it started.
The first thing we need to do is to create a new C# script and name it
Inventory. When you open the script, delete the
Update functions, leaving an empty class for us to use.
First, add this
using statement where the other
using statements are. The
using statement will be needed so that we can use the
List container variable:
Now, let's add the variables we require and place them after the opening class defining bracket:
bool showInventory = false; public Rect inventoryRect = new Rect(Screen.width / 2, Screen.height / 2, 400, 400); public GameObject ...