The purpose
In Unity development, UI elements on the Canvas system can intercept input events (like clicks) that are intended for the GameObjects underneath them, making those GameObjects unclickable (This is especially frustrating for users when the UI is semi-transparent). This article presents the standard solution for this problem.
Solution
By changing the UI settings, you can make the event pass through to the object below it, ignoring the event on the current UI element. This setting can be changed from either the UI or the code.
from UI
By unchecking the Raycast Target property on the corresponding UI Image component, the UI will ignore mouse events.

from code
Setting Image.raycastTarget to false causes the UI to ignore mouse events.
Below is an example of setting raycastTarget to false in a script attached to the target UI element.
GetComponent<Image>().raycastTarget = false;

comment