Skip to Content
Mastering UI Development with Unity
book

Mastering UI Development with Unity

by Dr. Ashley Godbold
April 2018
Beginner content levelBeginner
468 pages
11h 7m
English
Packt Publishing
Content preview from Mastering UI Development with Unity

Making the eight-directional virtual analog stick float

If all you want is an eight-directional analog stick, you're good to go! But, if you want the analog stick to float—appear where the players press and disappear when they lift their finger—you have to do a little bit more work.

To make the analog stick appear where the player clicks, complete the following steps:

  1. First, we need to create an area where the player will click to bring up the analog stick. Right-click Canvas in the hierarchy and select UI | Button to add a Button child to the Canvas. Rename the Button to Click Area.
  2. Remove the Text child object from the Click Area.
  3. Stretch the Click Area to fill the whole Canvas.
  1. Add some padding to the sides of Click Area by changing ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Game Development with Unity for .NET Developers

Game Development with Unity for .NET Developers

Jiadong Chen
Unity UI Cookbook

Unity UI Cookbook

Francesco Sapio

Publisher Resources

ISBN: 9781787125520Supplemental Content