Hi!
I'm having some difficulty hunting down an IndexOutOfRangeException Error, and are looking for some guidence.
I'm by far not a pro at C# and I've just recently started using SpriterDotNet for Unity and I've gotten it all to work. But I get this error on certain animations:
IndexOutOfRangeException: Array index is out of range.
(wrapper stelemref) object:stelemref (object,intptr,object)
SpriterDotNet.SpriterProcessor.GetBoneInfos (SpriterDotNet.SpriterMainlineKey key, SpriterDotNet.SpriterAnimation animation, Single targetTime, SpriterDotNet.SpriterSpatial parentInfo) (at C:/dev/libs/SpriterDotNet/SpriterDotNet/SpriterProcessor.cs:316)
SpriterDotNet.SpriterProcessor.UpdateFrameData (SpriterDotNet.FrameData frameData, SpriterDotNet.SpriterAnimation animation, Single targetTime, SpriterDotNet.SpriterSpatial parentInfo) (at C:/dev/libs/SpriterDotNet/SpriterDotNet/SpriterProcessor.cs:111)
SpriterDotNet.AnimationDataProvider.DefaultAnimationDataProvider.GetFrameData (Single time, Single deltaTime, Single factor, SpriterDotNet.SpriterAnimation first, SpriterDotNet.SpriterAnimation second) (at C:/dev/libs/SpriterDotNet/SpriterDotNet/AnimationDataProvider/DefaultAnimationDataProvider.cs:19)
SpriterDotNet.SpriterAnimator`2[TSprite,TSound].Animate (Single deltaTime) (at C:/dev/libs/SpriterDotNet/SpriterDotNet/SpriterAnimator.cs:234)
SpriterDotNetUnity.UnitySpriterAnimator.Animate (Single deltaTime) (at Assets/SpriterDotNet/UnitySpriterAnimator.cs:44)
SpriterDotNet.SpriterAnimator`2[TSprite,TSound].Step (Single deltaTime) (at C:/dev/libs/SpriterDotNet/SpriterDotNet/SpriterAnimator.cs:226)
SpriterDotNetUnity.SpriterDotNetBehaviour.Awake () (at Assets/SpriterDotNet/SpriterDotNetBehaviour.cs:54)
UnityEngine.Object:Instantiate(GameObject)
BossManager:InstantiateBoss() (at Assets/Managers/BossManager.cs:105)
BossManager:NextBoss() (at Assets/Managers/BossManager.cs:77)
First of all I made a change in the SpriterDotNetBehaviour.cs and changed the Start function to Awake instead since I was getting null references when trying to listen to animator.AnimationFinished in the Start function of other scripts. So far I have not encounered any problems with this change (I still get the IndexOutOfRangeException when reversing this). Do you know of any further risks for having this in Awake instead of Start?
If anyone could point me in the right direction that would be awesome!
Peace!
EDIT: I've seen others having trouble with negative widths. I have negative scaling (no negative widths) occuring, but I've tried to remove this aswell to no success . :'(