O'Reilly logo

Unity 5.x Game Development Blueprints by John P. Doran

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 a shop

Now that we have clicking working, let's add the ability to increase our cash per second or the amount we get per click!

  1. Start off by going to GameObject | UI | Panel and then rename the object to ShopPanel. Change the values of Left, Right, Top, and Bottom to 150.
  2. Now we need to create a holder for all of our buttons. Select the ShopPanel object from the Hierarchy and then create an Image object by going to GameObject | UI | Image.

    Note

    Note that because we had the ShopPanel object selected, it automatically knew that we wanted the image object to be a child of the ShopPanel object.

  3. Then, rename this new Image object to ShopElements. Open up the Anchor Presets menu and hold down Alt + Shift and then click on the top-stretch option ...

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