Image
Your GameObject which contains Image component, need to be the a child of GameObject which contains a Canvas component
Introduction
Your image gonna get the size of your GameObject world scale and image position gonna set at your GameObject world position.
Change color
You can see the color definition
No Images
If you do not set a path for an image, you component will be set only for color. There is no code to write to set it without image.
If your image conatins an image and you want only a color, you just have to set path to nothing ("").
Image
To set an image path in your Image component, there is 2 things to do :
First one : set the path
Second one : set the rectangle of your image :
here, your image have a size of 100x100 and your want to get all image.
Last updated