Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Repeating sprites without creating new objects (tiling)

Discussion in '2D' started by EyEy, Dec 11, 2013.

  1. EyEy

    EyEy

    Joined:
    Nov 23, 2013
    Posts:
    2
    I didn't find a way to use Sprites in Unity as a "tile".

    I want to create walls in my game without 3D objects (planes), but I didn't find a way to make Sprite use wrap mode "repeat".
    For example i have 10x8 square of walls, so I need to create now 10x8=80 objects to do this (low fps). I want to do it with one object (I can do that with 3D plane, but it's very-very bad in my 2D game).

    Any ideas?

    Thx!
     
  2. TomasJ

    TomasJ

    Joined:
    Sep 26, 2010
    Posts:
    256
    This feature is coming up in the next release.
    For now you won't be able to tile using a SpriteRenderer.
     
  3. quarag

    quarag

    Joined:
    Nov 3, 2013
    Posts:
    16
    Can you show me link where is any information about next version unity
     
  4. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    There isn't any yet AFAIK.

    if you need to tile/repeat something many times you might as well just use a Quad mesh primitive and throw your texture on it and set the repeating how you like it.
     
  5. truecrisis

    truecrisis

    Joined:
    Feb 17, 2015
    Posts:
    8
    I need to repeat a sprite too, and I cant figure this out. I've looked at numerous examples but I'm getting frustrated.
    My quad offers no texture options, and the material is even locked so I cant choose another shader to apply a texture. :( Why does this have to be so hard..

     
  6. Salmjak

    Salmjak

    Joined:
    Nov 25, 2014
    Posts:
    20
    Import the same file as a texture instead of a sprite (and set wrapping to repeat). Then throw the texture on your quad :)
     
    UncleChris likes this.
  7. TomasJ

    TomasJ

    Joined:
    Sep 26, 2010
    Posts:
    256