Wednesday, December 10, 2014

Unity 4.6 UI Touch and Mouse Input Tutorial

This Unity touch tutorial for Unity 4.6+ will show you how to call custom functions on any object in your scene when you touch or click on UI elements. This is perfect for menus, on-screen touch controls, and anything else that you want to happen when you touch/click on UI buttons.

Time Breakdown:
0:45 - I'm planning on redoing some of my old TouchLogic videos to work with the 4.6 UI
1:04 - How to create a GUITexture in Unity 4.6 (if you still need to use that old system)
1:45 - Creating a 4.6 GUI Button, explaining what the various gameobjects do
2:29 - Click / touching the button with the Unity remote... multitouch is limited on the Unity Remote
3:18 - Multitouch does work if you build the game and play it on your mobile device
3:50 - OnClick and the Event System
4:30 - Creating a custom script to call OnClick
5:53 - Image class is found in the UnityEngine.UI namespace
7:40 - Demonstration of calling our custom function OnClick
8:20 - Adding an EventTrigger component for more event types
9:55 - Demonstration of multitouch on an Android build
10:52 - Outro, thanks for watching :D