There are many cases where we wish to display an image onscreen, including logos, maps, icons, splash graphics, and so on. In this recipe, we will display an image at the top of the screen, and make it stretch to fit whatever width that the screen is resized to.
The following screenshot shows Unity displaying an image:
For this recipe, we have prepared the image that you need in a folder named
Images in the
To display a stretched image, follow these steps:
3D projects will, by default, import images as a Texture, and 2D projects will import images as ...