Hello Guest

Author Topic: Resizing source image of a Sprite Atlas  (Read 3266 times)

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Resizing source image of a Sprite Atlas
« on: January 29, 2015, 05:03:05 pm »
Hello, I've been using a TileMap created by adding a new Sprite Sheet (which uses a PSD as the source image). My question/issue is if it is possible to resize the PSD without screwing up the Tilemaps? This has been an ongoing issue where if I for example make the PSD longer, it completely screws up my tilemap's palette - majority of the brushes don't show up (yet they are still selectable). The only way to fix this is to re-create a new sprite collection and re-link everything, which is a huge pain. Is this fixable?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Resizing source image of a Sprite Atlas
« Reply #1 on: January 31, 2015, 12:22:46 am »
You can resize it but it ends up messing up the sprite indices - the sprites are indexed sequentially, eg.

2x2=
0 1
2 3

3x3=
0 1 2
3 4 5
6 7 8

You can write a script to fix this up if you know the dimensions of your tilemap before and after, but I would just add a second tileset texture to the same sprite collection rather than bothering with any of that. You can add as many as you want / need.