Home > Software engineering >  tiled draw mode in Sprite Renderer component
tiled draw mode in Sprite Renderer component

Time:08-12

Illustrating Image:
Illustrating Image:

Ok so my goal is to fill up the sky with blue. I used the tiled draw mode in Sprite Renderer component but it doesn't seem to be a good choice. I thought of creating a blue square and then put it on top of the sky but is there any way to do it automatically?

CodePudding user response:

You first have to set up the image to tile correctly. In the inspector for the image you want to tile, open the Sprite Editor, and move the border (green box) to select the SKY portion of your image. For example:

Image of Unity's Sprite Editor, with the border box set to encompass the sky

After doing this, your sprite should tile correctly:

enter image description here

Do Note:

If you're filling in a solid color for the sky, use the Sliced mode instead of Tiled to reduce polygon counts. (Tiled mode will make new quads for each repeated section, while Sliced will stretch the solid color in only one quad): Comparison between sliced & tiled mode (Left is Tiled, right is Sliced)

  • Related