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

I have 2 tiles on my tilemap that i cannot remove/erase

Discussion in '2D' started by Divinitize1, Jan 29, 2020.

  1. Divinitize1

    Divinitize1

    Joined:
    May 27, 2019
    Posts:
    99
    See the attached image.
    They're part of the "MainGround" tilemap in the hierarchy, I know this because they're using the same tilemap collision and they disappear when I hide the gameobject.
    However I cannot erase them, I have tried everything.
    Found one post saying I should try reimporting assets, I tried that but didn't work.
    The only other thing I could think is causing it is the "Can change Z position" which is currently unchecked and at 0, and I can't remember if I adjusted that in the past or not.
    It's really frustrating as I don't want to delete the tilemap and redo the level if possible.
    Any help is greatly appreciated.
     

    Attached Files:

  2. APSchmidtOfOld

    APSchmidtOfOld

    Joined:
    Aug 8, 2016
    Posts:
    4,473
    The delete tool in the tile palette will work only if you have selected the palette that was used to paint the tiles on the tilemap.
     
  3. Divinitize1

    Divinitize1

    Joined:
    May 27, 2019
    Posts:
    99
    Yes I know, thanks though.
    Have tried all the usual stuff.
     
  4. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,022
    would duplicating the tilemap do anything (trying to edit that) ?
    next thing i'd probably try using script to clone tilemap or clear using script..
     
  5. Divinitize1

    Divinitize1

    Joined:
    May 27, 2019
    Posts:
    99
    No luck with duplicating either, same problem.
    I guess ill just use this as an excuse to get some rule tiles finally sorted out so I can quickly repaint the level.
    Thanks for the replies guys.
     
  6. APSchmidtOfOld

    APSchmidtOfOld

    Joined:
    Aug 8, 2016
    Posts:
    4,473
    Are you sure you have done it properly, that you had the right palette selected in the tilemap palette?

    https://docs.unity3d.com/Manual/Tilemap-Painting.html#Eraser

    Or, maybe you had the right palette selected but you were trying to delete the tile on a tilemap that was not the tilemap on which the tile was painted.
     
  7. Divinitize1

    Divinitize1

    Joined:
    May 27, 2019
    Posts:
    99
    Yes have tried selecting all pallets and each tilemap individually, the only palette with that tile on is the Main one I use.
     
  8. APSchmidtOfOld

    APSchmidtOfOld

    Joined:
    Aug 8, 2016
    Posts:
    4,473
    What version of Unity are you using? You should report a bug.
     
  9. Divinitize1

    Divinitize1

    Joined:
    May 27, 2019
    Posts:
    99
    Just updated yesterday to latest 2019.3.0f6 , although i honestly can't remember if i had this problem on the last version too because it's been there a while. I'll report it for both after i eat but have no way to reproduce at this time.
     
  10. APSchmidtOfOld

    APSchmidtOfOld

    Joined:
    Aug 8, 2016
    Posts:
    4,473
    I haven't read every post. Did someome suggested the following:
    1. select the tilemap,
    2. in the palete select the erase tool,
    3. press the Ctrl key and drag a rectangle around the tiles to be deleted,
    4. left click do erase the tiles.
    Press Ctrl + left click to get rid of the selection rectangle afterwards.
     
    Last edited: Jan 29, 2020
  11. Divinitize1

    Divinitize1

    Joined:
    May 27, 2019
    Posts:
    99
    Yep, tried that too, tried selecting, moving, etc but it doesn't budge
    If I move the entire tilemap with the selection tool it still doesn't move however if I move the entire tilemap with just the standard engine/object transform tools it does move.
    It would honestly take me less than 5 mins to redo it with rule tiles, but would be nice to understand what's causing it still. I'll get it reported as a bug.
     
  12. APSchmidtOfOld

    APSchmidtOfOld

    Joined:
    Aug 8, 2016
    Posts:
    4,473
    Could you post your project somewhere? I'm curious, I'd like to take a look at it, if you don't mind, of course.
     
  13. Divinitize1

    Divinitize1

    Joined:
    May 27, 2019
    Posts:
    99
    Ah sorry would have loved to but i already corrected the issue now by just deleting the tilemap and re-doing it all.
     
  14. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    1,068
    This could be causing the issue you are facing with "unerasable" Tiles, which may be unintentionally changed with the keyboard shortcuts. The default brush erases only Tiles at the current Z position and would leave Tiles placed at the same XY position but with a different Z position. Perhaps this may have been the case where the Tiles have been accidentally placed at different Z positions?
     
    tonycrisiony likes this.
  15. APSchmidtOfOld

    APSchmidtOfOld

    Joined:
    Aug 8, 2016
    Posts:
    4,473
    That's an interesting question; I didn't know we could paint tiles on a tilemap at a z position that would be not the tilemap z position.
     
  16. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    1,068
    Previously, as a user, you were free to change the targeted Z position of the Brush. This can be done through the UI in the Tile Palette or through the Keyboard Shortcuts (- and +). Unfortunately, these Keyboard Shortcuts seem to be triggered in many cases unintentionally and without the user knowing if the Z Position field in the Tile Palette was minimised. The "Can Change Z Position" field was added and unchecked by default to prevent these cases, especially if the intention was only to stay a singe Z Position. If the Z Position field was changed previously, that may have caused the issue.

    A quick way of checking if this has happened would be to toggle the Debug mode of the Inspector and check if the Tilemap's size has a Z value greater than 1. This usually implies that Tiles have been painted on different Z positions.
     
  17. APSchmidtOfOld

    APSchmidtOfOld

    Joined:
    Aug 8, 2016
    Posts:
    4,473
    Well well, thank you for the tip. I'm going to do that in my game, just to make sure nothing of the kind happened on my tilemaps. :)
     
  18. Divinitize1

    Divinitize1

    Joined:
    May 27, 2019
    Posts:
    99
    Thanks for the reply, If it happens again ill look at that. I tried uploading it as a bug but the upload progress got stuck on 65% for a good hour+ and it shouldn't have been related to my internet speed so i had no choice but to cancel it.
    But hopefully, by the sounds of this reply, it wasn't a bug after all and maybe just a mistake i made with the Z positions.

    Thanks
     
  19. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    1,068
    That does not sound great, sorry about that!

    Alternatively, if you do not mind sharing the text version of a Scene file with the Tilemap, that would be helpful too!
     
  20. gareth_untether

    gareth_untether

    Joined:
    Jan 5, 2018
    Posts:
    64
    It's possible to remove the tiles with the eraser if you know what the z value of the tile is. Is there a way to know what the specific z value is for the tile?
     
    Last edited: Nov 14, 2020
  21. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    1,068
    We will be adding a "GetTilesRange" API which will get the positions and Tiles within a range of positions (eg. 0, 0, -1000 to 0, 0, 1000) to help with getting Tiles in those specific z values. The default brush will be updated with this to make it simpler to use as well.
     
  22. raarc

    raarc

    Joined:
    Jun 15, 2020
    Posts:
    535
    if you change your scene view to 3d you will see the tiles sticking out if you rotate the camera
     
    gareth_untether likes this.
  23. Reninate

    Reninate

    Joined:
    Nov 18, 2020
    Posts:
    6
    Hi, we're having the same or at least a similar problem in a game my team and I making for university. Of course the Problem occured only days before the deadline. Some tiles on different tilemaps are not erasable and they get randered weirdly in the game. compare:

    Would be great if a solution could be found. We already started repainting the whole map, but thats a whole bunch of work.
     
  24. Reninate

    Reninate

    Joined:
    Nov 18, 2020
    Posts:
    6
    Just figured it out... it was the z pane problem! Thank you
     
  25. mahmod_MC

    mahmod_MC

    Joined:
    Sep 17, 2020
    Posts:
    1
    Click edit in tile palette!
     
  26. Genjurah

    Genjurah

    Joined:
    Jul 12, 2015
    Posts:
    1
    Very old post, but in case someone has this error in the future as well: my problem was that I had a prefab brush selected, when i changed it back to default brush it did remove the tiles from my map :)
     
  27. john79

    john79

    Joined:
    Jul 13, 2016
    Posts:
    15
    i found the reason why some tile do not get deleted. if you move them then you are not able to delete it anymore. you need to select the old position. i think this is a bug.

    unity 2021.3.1
     
    Sikosis and decrescYono like this.
  28. IndividualGamesUnity

    IndividualGamesUnity

    Joined:
    Jun 11, 2019
    Posts:
    3
    Unity 2020.3.41f1 Solution:
    1. Select TileMap
    2. Go to Tile Platte Menu
    3. Select "Select an area of the grid(S)"
    4. In scene view hover to tile you want to delete, select the tile
    5. Grid Selection menu should've popped up in your inspector
    6. Modify Tilemap section, select "Delete Row", enter # of rows(ie 1), Click Modify
    Caused by: Z Position change while painting tiles.
     
  29. Sikosis

    Sikosis

    Joined:
    Jul 7, 2014
    Posts:
    7
    I've got this exact same problem in Unity 2021.3.27f1

    I ended up just recreating the tilemaps to solve this bug.
     
    Last edited: Aug 9, 2023