Select your preferred scripting language. All code snippets will be displayed in this language.
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseThe alpha threshold specifying the minimum alpha a pixel must have for the event to be passed through.
The alpha is decided from the image sprite only, while the alpha of the Image color is disregarded.
The alphaEventThreshold is 1 be default which means events inside the rectangle are always passed through regardless of alpha. In order for lower values to work, the sprite used by the Image must have readable pixels. This can be achived by enabling Read/Write enabled in the advanced Texture Import Settings for the sprite and disabling atlassing for the sprite.