April 2018
Beginner
468 pages
11h 7m
English
As stated earlier, if you want to use the Event System with a non-UI object, you must attach a Raycaster to a camera within the scene. You can add either a Physics 2D Raycaster or a Physics Raycaster (or both) to your camera based on whether you are using 2D or 3D.
From within the camera's inspector, you can add the Physics 2D Raycaster by selecting Add Component | Event | Physics 2D Raycaster and the Physics Raycaster by selecting Add Component | Event | Physics Raycaster.
The two components appear as follows:

The Event Mask property determines which types of objects can receive raycasting.
If you attempt to add either of ...