Non-Rectangular Button in Unity (Click on transparent button)

Опубликовано: 18 Май 2026
на канале: def1NeX
3,542
137

Buttons with transparency are very common part of the UI in any game on Unity.
In this tutorial you will learn how to detect click only on not transparent part of a button in Unity.
After watching this video you will know how to make non-rectangular button click detection.

✅ Projects Sources available for the sponsors
YouTube – https://bit.ly/def1NeXSponsorshipYT

👉🏼 Subscribe: http://bit.ly/defStudiosSubscribe
👉🏼 Telegram – https://bit.ly/defStudios-TG
👉🏼 Discord – https://bit.ly/defStudios_Discord
👉🏼 Twitter – http://bit.ly/defStudios_Twitter

00:00 - Hello, world!
00:18 - Problem description
01:28 - AlphaHitTestMinimumThreshold
02:18 - Test scene
02:46 - Problem solving concept
04:21 - Code
18:57 - Result