Inheritance: SpineAttributeBase
示例#1
0
        public static Attachment GetAttachment(string attachmentPath, SkeletonData skeletonData)
        {
            Hierarchy hierarchy = SpineAttachment.GetHierarchy(attachmentPath);

            if (hierarchy.name == string.Empty)
            {
                return(null);
            }
            return(skeletonData.FindSkin(hierarchy.skin).GetAttachment(skeletonData.FindSlotIndex(hierarchy.slot), hierarchy.name));
        }
        public static Spine.Attachment GetAttachment(string attachmentPath, Spine.SkeletonData skeletonData)
        {
            var hierarchy = SpineAttachment.GetHierarchy(attachmentPath);

            if (string.IsNullOrEmpty(hierarchy.name))
            {
                return(null);
            }

            SlotData slot = skeletonData.FindSlot(hierarchy.slot);

            if (slot == null)
            {
                return(null);
            }
            return(skeletonData.FindSkin(hierarchy.skin).GetAttachment(slot.Index, hierarchy.name));
        }
示例#3
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));
        }
示例#4
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));
        }
示例#5
0
 public static Attachment GetAttachment(string attachmentPath, SkeletonDataAsset skeletonDataAsset)
 {
     return(SpineAttachment.GetAttachment(attachmentPath, skeletonDataAsset.GetSkeletonData(true)));
 }