abuki

  • منذ 2 أيام
  • انضمّ(ت) 7 نوفمبر 2016

    @abuki We missed to reference the documentation earlier. This requirement is documented here as follows:

    The mixDuration can be set manually rather than use the value from getMix. In that case, the mixDuration can be set for a new track entry only before update is first called.

    @abuki Sorry for the long delay!

    The problem is that you're first calling AnimationState.SetAnimation, then through the Start callback you're calling skeletonAnimation.Update(0) which calls AnimationState.Update(0) and after it has already been updated, you're calling mainTrackEntry.MixDuration = 0; which messes with the internal mixDuration state.

    In general you shall always finish setting up the TrackEntry settings before calling AnimationState.Update. In most cases that's no problem, but in your case where the default mix is 0.2 and you're later setting mixDuration to 0.0, it unfortunately triggers a problem.

    So to fix your issue, whenever calling SetAnimation, calling skeletonAnimation.Update(0); from the Start callback makes little sense, instead just call it like this:

     var mainTrackEntry = skeletonAnimation.AnimationState.SetAnimation(0, animWithoutKey, true);
    mainTrackEntry.MixDuration = 0;
    skeletonAnimation.Update(0);

    @abuki Sorry to hear you're having troubles. Note that if you are using the spine-unity runtime, you need to update the spine-csharp core and spine-unity runtimes at the same time. Which version of the spine-unity runtime were you using before and after the update?

    This spine upgrade is causing the editor and build to freeze after a while without giving any specific error.

    What do you mean by "after a while"? When building (to what platform?), or when opening your project after the update, or when having the project open and after updating the runtime? Please always provide as much information as possible.

    In general we need a reproduction project to fix such issues unfortunately.

    @abuki Glad to hear, thanks for the quick feedback!

    @abuki We have just found the cause of the issue and pushed a bugfix to the 4.2 branch.

    A new spine-unity 4.2 unitypackage is available for download:
    https://esotericsoftware.com/spine-unity-download
    Please let us know if this resolves the issue for you as well. Thanks again for reporting!

      @abuki FYI: The issue seems to only occur with #define SLOT_ALPHA_DISABLES_ATTACHMENT active in MeshGenerator.cs line 42, so you might want to disable this define locally in your installation until we have released a proper bugfix for the issue.

      @abuki We're sorry for the troubles! Thanks for reporting and providing a reproduction Unity project up front, we could reproduce the issue.

      We've created an issue ticket here:
      EsotericSoftware/spine-runtimes2532
      We will get back to you here on the forum as soon as we've figured out what's going wrong.