Search Unity

What is the workflow for reimporting tiles?

Discussion in '2D' started by Marceeex, Sep 12, 2019.

  1. Marceeex

    Marceeex

    Joined:
    Jan 20, 2017
    Posts:
    1
    Hi!
    I'm curious what your workflow is when you are still working on your tileset, but you use it already to build your tilemaps.

    Here is how I tried it and failed:
    1. Created a tileset image with an image editing software, saved to png, I imported it as a sprite in unity.
    2. Created a new palette.
    3. Assigned the sliced sprites to the palette, so unity generates Tile objects from it.
    4. I built a level using this palette.
    5. Then I wanted to change smaller bits of the original tileset image.
    6. I changed the tileset image, and saved it on top of the original file.
    7. I grabbed the updated sliced sprites and assigned them to the palette, so unity generated new Tile objects from it, overriding the previous Tile objects.
    8. The whole tilemap I made previously was now filled in with different shades of red / pink instead of the new tiles.

    So the question is, how can I properly reimport a tileset image and update the tiles in the tilemap with the new ones.

    Thanks for your answers in advance!
     
  2. jeffreyschoch

    jeffreyschoch

    Joined:
    Jan 21, 2015
    Posts:
    2,558
    If the layout of the tiles are exactly the same, then in your file browser outside of Unity, you can replace the image with a new one, making sure it has exactly the same file name. That will swap the texture out and keep all the metadata and asset references.