Search Unity

2D Combining Sprites

Discussion in '2D' started by Aislin, Jun 19, 2014.

  1. Aislin

    Aislin

    Joined:
    Feb 22, 2014
    Posts:
    17
    What's the best way to combine sprites to create a single sprite? For example, say I have tiles that contain up to 3-digit numbers that randomly generate each time a level loads. I have a prefab for the blank tiles, and then I have the graphics for the individual number 0-9.

    So say I want to generate "468" on a tile. I would want to use the tile prefab and then position/scale the numbers "4" "6" & "8" accordingly. What's the best way to merge all of this together so whenever the tile moves, the number "468" moves with it?

    Thanks so much!
     
  2. Pyrian

    Pyrian

    Joined:
    Mar 27, 2014
    Posts:
    301
    Simply give the tiles a blank parent GameObject. Then, when you update the position of the parent, its children will match.
     
  3. Aislin

    Aislin

    Joined:
    Feb 22, 2014
    Posts:
    17
    Thanks again that worked :)