I am trying to create a rectangle with a texture background with a constant size and that it will stay this way no matter how the rectangle is scaled.
there is a checkbox in the image or sprite renderer components which says preserve aspect ratio. tick that and scale as you wish