In the latest runtime, I found that there is no SetWorldPosition() in SkeletonExtensions class.
The SetPosition is for local space which is also not consistent with Unity convention as Unity position without the 'local' imply world space stuff. There is also a GetLocalPosition() that do have the "local" in its name.
I suggest to change this a little bit to avoid confusion and also add back to SetWorldPosition() for completeness.
Here is the current code:
/// <summary>Sets the bone's (local) X and Y according to a Vector2</summary>
public static void SetPosition (this Bone bone, Vector2 position) {
bone.X = position.x;
bone.Y = position.y;
}
/// <summary>Sets the bone's (local) X and Y according to a Vector3. The z component is ignored.</summary>
public static void SetPosition (this Bone bone, Vector3 position) {
bone.X = position.x;
bone.Y = position.y;
}
/// <summary>Gets the bone's local X and Y as a Vector2.</summary>
public static Vector2 GetLocalPosition (this Bone bone) {
return new Vector2(bone.x, bone.y);
}