# Generating a Sprite to cover given area

I have an area say a x b of cells. actually I render every single cell in this matrix with a tile representing floor, wall, etc. What I'm trying to achieve it to replace this tiling system with a unique tile covering the whole a x b area.

I tried to play with creating a single GameObject and then adding a SpriteRenderer component with the base idea to stick in a sprite with desired size so that the image (whatever it is) gets stretched to fit it but apparently all the suitable fields which could be involved in this are readonly (I considered the rect and the bounds attribute).

In other words I feel like I'd need to attach a SpriteRenderer with a dynamic size based on given dimensions. How could I reach this goal?

• Have you looked into using the localScale fields of the transform component to do the stretching you need? – DMGregory Apr 30 '16 at 14:09