Closed apexJCL closed 8 years ago
Well it searches for the same name, this solution will work only in case if someone named their thing aaaPack. what if they named the file aaaZZZ and then have regions called bbb? The fix here is to just be consistent in naming the pack and it's inner regions, no?
Quickfix for
java.lang.IndexOutOfBoundsException: index can't be >= size: 0 >= 0
error at using imported sprite animations on Overlap2D.Error replication steps
It caused a force close and this was the output to stdout:
That because in
SpriteComponentFactory
, thegetRegions()
function searches for regions that contains spritenamePack, when in fact it should be searching only for spritename.Ej:
Sprites: megaman01.png, megaman02... Region names: megaman01, megaman02... Packed Atlas name: megamanPack filter: megamanPack
It matches the region names with
region.name.contains(filter)
so the region name will never contain spritenamePack but it will contain spritename