O'Reilly logo

Unity 4 Game Development HOTSHOT by Jate Wittayabundit

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the INVENTORY tab

So, we are now in the second page of our menu window, which is the INVENTORY page. In this section, we will create an item scroll that the player can use to scroll up and down to select the item and see its name, amount, and information about the item.

Engage thrusters

We will start with adding the parameters by performing the following steps, which we will use to store the data in our INVENTORY page:

  1. Open the ItemsContainer class; now, we will create the item's array object and the scroll view that can contain all the items; firstly, add the following highlighted code to create new variables:
    // Unity JavaScript user:
    
    #pragma strict
    import System.Collections.Generic;
    …
    private var _isEquipment : boolean;
    private final ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required