Assets/Lib.Spine/spine-unity/SkeletonExtensions.cs
/// <summary>Sets the skeleton-space position of a bone.</summary>
/// <returns>The local position in its parent bone space, or in skeleton space if it is the root bone.</returns>
Sets the skeleton-space position of a bone.
Sets the skeleton - space position of a bone .
public static Vector2 SetPositionSkeletonSpace (this Bone bone, Vector2 skeletonSpacePosition) {
			if (bone.parent == null) { 
				bone.SetPosition(skeletonSpacePosition);
				return skeletonSpacePosition;
			} else {
				var parent = bone.parent;
				Vector2 parentLocal = parent.WorldToLocal(skeletonSpacePosition);
				bone.SetPosition(parentLocal);
				return parentLocal;
			}
		}
public static Vector2 SetPositionSkeletonSpace ( this Bone bone , Vector2 skeletonSpacePosition ) { if ( bone . parent == null ) { bone . SetPosition ( skeletonSpacePosition ) ; return skeletonSpacePosition ; } else { var parent = bone . parent ; Vector2 parentLocal = parent . WorldToLocal ( skeletonSpacePosition ) ; bone . SetPosition ( parentLocal ) ; return parentLocal ; } }
Sets the skeleton-space position of a bone.
Sets the skeleton - space position of a bone .
// root bone
The local position in its parent bone space, or in skeleton space if it is the root bone.
The local position in its parent bone space or in skeleton space if it is the root bone .
Bone
this
skeletonSpacePosition
Vector2