Jump to content

Maisey

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Maisey

  1. Alright! Thanks Loodakrawa, you're the best! ^^
  2. 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 . :'(
  3. Hello guys! Great tool, and thanks for all the hard work you've put into this! I've gone through this thread trying to find a solution to a z-value problem I've been having but can't really find a reliable solution. On most of my animations one or several elements switches z-orders, especially between animations. For example idle->running. In spriter there is no change of the z-order between these animations, but in unity there is. I currently work around these issues in one of three ways: 1) Create a gazzilion keyframes in spriter Works in about 60% of the cases, but if there are not enough keyframes there will be moments with keyframe gaps where things get missaligned as if there was something still instructing a faulty z-order in absense of keyframes. Also resorting to this alternative break any hope of ever working with the animation again. 2) Switch around with the z-order at current keyframes. This works in about 40% of the cases. I would assume this forces unity to adjust an otherwise faulty z-index, but sometimes the sorting is still off and in some cases this is not an option if you only have two or three sprites in the animation. 3) Redo the animation Works in about 50% since the problems with the z-order has a new chance of occuring. This is usually the best approach but is of course extreamly tiring. I've tried reimporting the animations, reimporting Spriter2UnityDX, the Apply Spriter Z Order checkbox in the Entity Renderer, and a bunch of other stuff on multiple occasions but these inconsistencies keep coming. Unfortunately I don't really feel confident enough to dive into the code yet, and I'm obviously aware that this is a very unspecific problem and hard to solve. I'm just wondering if I'm the only one experiencing this, which might narrow it down to that the problem lies somewhere within how I'm doing things. As far as I know I'm not doing anything strange, I set default pivots and don't use any unsupported features of Spriter. I do have boneless sprites, but this issue happens to "boned" sprites aswell. Peace!
×
×
  • Create New...