Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

OH! You can also do line 21 much shorter if you change the image variable on line 6 to a RectTransform, so instead you're grabbing the rectTransform directly from the image GameObject instead of grabbing the image and then getting the rectTransform from that.