O'Reilly logo

Unity Game Development Scripting by Kyle D'Aoust

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

Playtesting

Now that we've created our inventory and can show it on the GUI, let's set up a test scene and try out our new inventory.

Creating a test scene

To start off, create a new scene and name it "Chapter 4". After this, create two empty GameObjects, name one of them "Inventory" and the other one "Empty". Drag Empty to Inventory, creating a parent-child relationship. This is what your hierarchy should look like now:

Creating a test scene

Once you've done this, drag the Inventory script to the Inventory GameObject. Set the X position of Inventory Rect to 300 and its Y position to 200. Then in Inv Items, set the Size value to 9 and in Quick Items set its Size value to ...

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