예제 #1
0
        public static Spine.Attachment GetAttachment(string attachmentPath, Spine.SkeletonData skeletonData)
        {
            var hierarchy = SpineAttachment.GetHierarchy(attachmentPath);

            if (hierarchy.name == "")
            {
                return(null);
            }

            return(skeletonData.FindSkin(hierarchy.skin).GetAttachment(skeletonData.FindSlotIndex(hierarchy.slot), hierarchy.name));
        }
예제 #2
0
        public static Spine.Attachment GetAttachment(string attachmentPath, Spine.SkeletonData skeletonData)
        {
            var hierarchy = SpineAttachment.GetHierarchy(attachmentPath);

            if (hierarchy.name == "")
            {
                return(null);
            }

            Skin skin = skeletonData.FindSkin(hierarchy.skin);

            if (skin == null)
            {
                Debug.LogErrorFormat("null skin attachmentPath={0}; skeletonData:{1}", attachmentPath, skeletonData.name);
            }
            int index = skeletonData.FindSlotIndex(hierarchy.slot);

            return(skin.GetAttachment(index, hierarchy.name));
        }
예제 #3
0
        public static Spine.Attachment GetAttachment(string attachmentPath, Spine.SkeletonData skeletonData)
        {
            var hierarchy = SpineAttachment.GetHierarchy(attachmentPath);

            return(string.IsNullOrEmpty(hierarchy.name) ? null : skeletonData.FindSkin(hierarchy.skin).GetAttachment(skeletonData.FindSlotIndex(hierarchy.slot), hierarchy.name));
        }