public static void RestoreBindPose(this SpriteCache sprite)
        {
            var skinningCache = sprite.skinningCache;
            var skeleton      = sprite.GetSkeleton();

            Debug.Assert(skeleton != null);
            skeleton.RestoreDefaultPose();
            skinningCache.events.skeletonPreviewPoseChanged.Invoke(skeleton);
        }
        public static BoneCache[] GetBonesFromMode(this SpriteCache sprite)
        {
            var skinningCache = sprite.skinningCache;

            if (skinningCache.mode == SkinningMode.SpriteSheet)
            {
                return(sprite.GetSkeleton().bones);
            }

            var characterPart = sprite.GetCharacterPart();

            Debug.Assert(characterPart != null);
            return(characterPart.bones);
        }