Image component

The first setting on the Image component is the Source Image property, which represents the sprite that will be rendered. The Color property represents the base color of the sprite being rendered. Leaving the color at white will make the image appear exactly as the sprite, but changing the color will add a tinted color overlay to the image. You can also change the transparency of the image by reducing the alpha value. The Material property allows you to add a material to the image. The Raycast Target property works the same way as it does on the Text component, by specifying whether the image will block clicks on UI objects behind it or not.

Chapter 5 contains an example that demonstrates how to swap the Source Image via ...

Get Mastering UI Development with Unity now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.