Unity provides various components for facilitating user input. These components are used first to identify if the user is looking at a specific GameObject, if the user has interacted with a touch device, and how a GameObject should respond to input from a touch device. Let's take a brief look at the components we need for this project.
Facilitating user interaction
Raycasters
When we created the first Canvas for the scene, Unity also added an item called EventSystem. An EventSystem is used to detect where current input events need to be sent and Raycasters provide that information. Think of a Raycaster as a visible laser pointer. When evoked in your scene, the Raycaster sends out a ray which reports the object or objects...