Hello Guest

Author Topic: Bug in sprite collection editor (removing missing sprites)  (Read 3325 times)

Konstantin

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 3
    • View Profile
Bug in sprite collection editor (removing missing sprites)
« on: December 12, 2013, 02:31:16 pm »
1. Create a sprite collection with some sprites. I used multiatlas option with thousands of sprites.
2. Delete a sprite in Unity.
3. Delete the missing sprite in sprite collection editor.
4. Commit the sprite collection.

Sprite definition stays in the sprite collection prefabs with empty name. That has broken my automatic animation builder, so I have removed the unnamed sprites from the prefab using text editor and rebuilt the sprite collection once more.

PS Use text serialization for all assets to be able to edit your prefabs with text editors.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Bug in sprite collection editor (removing missing sprites)
« Reply #1 on: December 12, 2013, 03:14:59 pm »
Thats not a bug, its intended behaviour. All sprites use indices to reference themselves in a collection. If they get reordered, the indices will break. You should account for missing (0 length name) sprites in your scripts.