Hi there
So I had some code that to scale something would do:
_skeleton.RootBone.ScaleX = scale;
_skeleton.RootBone.ScaleY = scale;
However this seems to not work anymore, ie if you try that on the XNA example the animation moves through X and Y 🙁
To scale instead you have to iterate over all the Bones and apply scaling like this
foreach (var bone in _skeleton.Bones)
{
bone.ScaleX = scaleTemp;
bone.ScaleY = scaleTemp;
}
This is the case since commit from 27/05/2013
6c784ec0cd17a232146e2b9092ea8250e15b3c7a
- Added bone inherit rotation and scale in csharp
Just mimicked the changes in spine-libgdx and your code pattern in c#.
Working fine in Unity.
It makes sense that the scaling is per bone but it caught me off guard , I would say is a potential source of many bugs, maybe there is a better way to express this in code simply, maybe adding a method in skeleton? ScaleAllBones(float scale) at least seeing the method in there would flag that this is the way to do this.
Cheers