@fengmin Sorry to the inconvenience, thanks for reporting! There was indeed no way to properly update the referenced bones and AnimationState references in SkeletonRootMotion
after changing SkeletonDataAsset
and calling skeletonAnimation.Initialize(true)
.
We have just pushed a commit which now automatically updates all references at SkeletonRootMotion
automatically.
A new spine-unity 4.2 unitypackage is available for download here as usual:
https://esotericsoftware.com/spine-unity-download
From the changelog:
SkeletonRootMotion
components now provide a publicInitialize()
method which is automatically called when callingskeletonAnimation.Initialize(true)
to update the necessary skeleton references. If a different root bone shall be used, be sure to setskeletonRootMotion.rootMotionBoneName
before callingskeletonAnimation.Initialize(true)
.
Issue ticket URL for later reference:
EsotericSoftware/spine-runtimes2575