Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Select and drag groups of tiles in a scene

Discussion in '2D Experimental Preview' started by Ultronator, Dec 19, 2016.

  1. Ultronator

    Ultronator

    Joined:
    May 24, 2015
    Posts:
    3
    Is there a way to move tiles within the Tilemap object once they are placed? Let's say I want to move a large group of tiles that I meticulously placed on a Tilemap, over just one square to the right, because I want a gap I'm expecting the player to jump over to be a little larger. Here's the best I can come up with:

    1. Select the Picker tool
    2. Select a group of tiles on the Tilemap
    3. Paint them off to the side somewhere (to preserve them)
    4. Erase the original tiles, making a mental note of exactly where they were located
    5. Select the Picker tool again
    6. Select the "preserved" tiles
    7. Paint them one square over from where the original (now erased) tiles were

    I've been prototyping a 2d tile based game in Unity for a while now and I am currently placing tiles individually (without a Tilemap) and using the snap feature (V) to align them. With this approach, I can easily select large groups of tiles and move them over. This works ok, but I'd much rather be using something that was clearly designed for this purpose. If Tilemap doesn't have a way to move groups of tiles like this then I'm hesitant to use it.

    By the way, even if there is no way to do this, I'm still very grateful to have the Composite Collider 2D, as it's a huge help to me for creating one smooth rectangular collider for multiple tiles (with box colliders) in a row.
     
    AlteriusOmega and Tymianek like this.
  2. Johaness_Reuben

    Johaness_Reuben

    Joined:
    Jan 27, 2016
    Posts:
    253
    What you can do instead is, with the Paint tool is selected.

    1. Control + Paint tool to select group of tiles.
    2. Shift + Left Click to erase original tiles.
    3. Paint on square over.

    Additionally if you have multiple layers selected it will copy the tiles from the different layers and paint them into the respective layers as well.
     
    AlteriusOmega likes this.
  3. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    move.gif
    The default tool (arrow) was previously just for selecting. We are changing it to select+move now. Here is a GIF from our current internal build.
     
  4. Ultronator

    Ultronator

    Joined:
    May 24, 2015
    Posts:
    3
    I haven't checked this in a while, but thanks for the answer. It's great that you guys are continuing to tweak the 2d tools. I'm hoping to see the tilemap make its way into an upcoming release soon.
     
  5. stechmann

    stechmann

    Joined:
    Feb 24, 2012
    Posts:
    34
    I assume this thread is not about the Unity built-in tilemap system, but some third party plug-in?
     
  6. DearUnityPleaseAddSerializableDictionaries

    DearUnityPleaseAddSerializableDictionaries

    Joined:
    Sep 12, 2014
    Posts:
    135
    That sounds like a great feature. Has the feature been released yet?
     
    spacehelmetboy likes this.
  7. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    562
    Doesn't look like it is ( 2018.3.8f1)
    You have to click the move tool first.
     
    Tymianek likes this.
  8. DearUnityPleaseAddSerializableDictionaries

    DearUnityPleaseAddSerializableDictionaries

    Joined:
    Sep 12, 2014
    Posts:
    135
    It isn't released. What do you mean by "you have to click the move tool first"? Why do I have to click the move tool first when the feature is not released yet?
     
  9. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    562
    YOU'RE the one who asked "Has the feature been released yet?". I answered your question by actually TRYING IT. What part of that is wrong?
     
  10. DearUnityPleaseAddSerializableDictionaries

    DearUnityPleaseAddSerializableDictionaries

    Joined:
    Sep 12, 2014
    Posts:
    135
    Oh. I see, sorry senpai.

    It works now, after clicking on the arrow tool, then the move tool.
     
    Last edited: Apr 19, 2019
  11. jleven22

    jleven22

    Joined:
    Mar 26, 2019
    Posts:
    415
    Not working for me, so I must be doing it wrong, but can someone describe the process step by step? I am selecting "selection tool," selecting an area, then clicking move, but when I do that it unselects the selection.
     
  12. thathurtabit

    thathurtabit

    Joined:
    Jul 29, 2018
    Posts:
    6
    So I just tried this out for the first time. In the Tile Palette window, click the [arrow] icon and click and drag over the tiles you want to move, when they're selected, click the [move] icon to click and drag them to a new location.
     
  13. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    562
    You have to make sure you are in Edit mode.
     
    gamerboiuwu likes this.
  14. PikeOne

    PikeOne

    Joined:
    May 13, 2020
    Posts:
    1
    Tx for the thread.
    Arrow, select tiles, then the move tool worked for me.
    Buuuuuuut....I thought I would be able to fine tune them like you can moving platforms by dragging the arrows (I'm doing the 2D gameKit).
    Not complaining but I feel like that's a big miss here-not being able to fine tune the position.
    I tried to do stuff with sliders but I couldn't get anything going with that.
    There's gotta be a way to fine tune with sliders right????

    Tx for any help you can give me.
     
  15. Scharma

    Scharma

    Joined:
    May 14, 2020
    Posts:
    1
    I'm able to move just fine with the instructions above. However, is there any way to copy and paste a certain section of the level?
     
  16. oldslomo

    oldslomo

    Joined:
    Sep 16, 2021
    Posts:
    1
    I followed the instructions, I selected the tiles I wanted to move but couldn't move, rotate, scale or transform them, even the tile base got erased upon selecting it :s
     
    igorbelyayev1 and condekua like this.