O'Reilly logo

Unity 3 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 an inventory tab

So, we are 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 of the item.

Engage Thrusters

We will start with adding the parameters, which we will use to store the data in our inventory page:

  1. Open Menu.js, and add the following code to it; first the parameters:
    //Item Tab private var r_itemsBox : Rect = new Rect (237, 67, 360, 247); private var r_tipBox : Rect = new Rect (237, 330, 360, 107); private var r_itemsButton : Rect = new Rect (257, 87, 340, 227); private var r_tipButton : Rect = new Rect (257, 350, 340, 87); private var r_verScroll : Rect = new ...

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