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. Dismiss Notice

Question TilePalette does not snap when positioned.

Discussion in '2D' started by UDN_388648da-a4c8-4308-af17-47614073dd10, Jul 23, 2023.

  1. UDN_388648da-a4c8-4308-af17-47614073dd10

    UDN_388648da-a4c8-4308-af17-47614073dd10

    Joined:
    May 13, 2017
    Posts:
    40
    TilePalette does not snap when positioned.

    Create a TilePalette and create a TileMap in your scene. Now you can set the tiles.
    However, since snapping is not performed when tiles are selected, it is not possible to arrange them at regular intervals.

    I can't tell if this is a TilePalette problem, a Scene problem, or a TileMap problem.
     
  2. DanielTanBK

    DanielTanBK

    Unity Technologies

    Joined:
    Aug 20, 2019
    Posts:
    80
    Hello, do ensure the following:
    • Your Tilemap has a parent Grid. This is automatically done when creating a Tilemap from the Gameobject creation menu or right-click context menu, but if you are adding in the components manually do keep that in mind.
      More info on tilemap creation workflow here.
      upload_2023-7-24_10-43-17.png
    • When setting/placing tiles the Brush tool is selected in the Tile Palette and a tile in the palette is selected.
      More info on Brush tool here.
      upload_2023-7-24_10-46-49.png
    If these are not the issue do let us know more details or attach screenshots of your scene and palette setup
     
  3. UDN_388648da-a4c8-4308-af17-47614073dd10

    UDN_388648da-a4c8-4308-af17-47614073dd10

    Joined:
    May 13, 2017
    Posts:
    40
    thank you.
    As per your suggestion, I confirmed the grid by reviewing the settings.

    However, the size of the grid I am using is very small for the dots. How can I change the grid size?
    Changing the snapincrement at the top of the SceneView didn't give the expected results.
     
  4. DanielTanBK

    DanielTanBK

    Unity Technologies

    Joined:
    Aug 20, 2019
    Posts:
    80
    You can change it from the Grid Component > Cell Size
    More info here.
    upload_2023-7-25_10-51-12.png

    What is your use case for setting up the grid and tilemap in this way?
     
  5. UDN_388648da-a4c8-4308-af17-47614073dd10

    UDN_388648da-a4c8-4308-af17-47614073dd10

    Joined:
    May 13, 2017
    Posts:
    40
    Ah, I understand.

    There are two Grid components, one attached to the Grid object in the scene and one attached to the Palette.
    By matching these two values, I was able to swap them to the intended position.
    This issue has been resolved.
     
    DanielTanBK likes this.