I think the title summarizes the problem. So I have a couple sprites whose animation start at different cells. But when I export the spriteManager and load it. I get both animations starting at 0.
Example. Using the Inspector I set:
Start Cell: 8
End Cell: 15
Loop: true
Delay: 100
Then I select the SpriteManager and hit SAVE which gets me spriteManager.json.
Now loading this file. Everything works fine except that I get the animation starting from cell 0 and ending at 15.
If you load it and select the red sprite. Youāll see that the animation start from the 1st cell of the spritesheet when I actually export it with the start cell set to 16.
Guys, whose baby is the SpriteManager and Sprites?
The problem here is that setting fromIndex at line 216 triggers the playAnimation function in thinSprite at line 92 with values from = 16 and to = 0 (toIndex (to) is not set yet, itāll be on line 217)
In the playAnimation function from > to at line 100 so it executes the else branch and sets _fromIndex to to which has currently value of 0. This is why the animation starts from 0.
Proposed change is to change the Sprite.Parse function like you can see below so it sets the fromIndex and toIndex in different order according to their values. Itās tested and it works but I am not sure whether this is not going to break something else. Can someone please have a look at it and confirm the changes?