yunhukeji

一系列报错
Assets\Spine\Runtime\spine-unity\Utility\SkinUtilities.cs(81,26): error CS1061: 'Skin.SkinEntry' does not contain a definition for 'Key' and no accessible extension method 'Key' accepting a first argument of type 'Skin.SkinEntry' could be found (are you missing a using directive or an assembly reference?)
Assets\Spine\Runtime\spine-unity\Utility\SkinUtilities.cs(81,35): error CS1061: 'Skin.SkinEntry' does not contain a definition for 'Value' and no accessible extension method 'Value' accepting a first argument of type 'Skin.SkinEntry' could be found (are you missing a using directive or an assembly reference?)


Attachments 定义
public ICollection<SkinEntry> Attachments { get { return attachments.Values; } }
一处报错代码
public static Skin GetClone (this Skin original) {
var newSkin = new Skin(original.name + " clone");
var newSkinAttachments = newSkin.Attachments;
var newSkinBones = newSkin.Bones;
var newSkinConstraints = newSkin.Constraints;

foreach (var a in original.Attachments)
newSkinAttachments[a.Key] = a.Value; -- 这里报错

newSkinBones.AddRange(original.bones);
newSkinConstraints.AddRange(original.constraints);
return newSkin;
}
报错原因Skin.Attachments是没有Key的,Skin.attachments才是有Key的

请及时修复

---

应该是升级导致的,不是源代码问题,我搞错了
yunhukeji
  • 帖子: 1

Harald

感谢您告知我们,很高兴您已解决问题。
Thanks for letting us know, glad you've figured it out.
头像
Harald

Harri
  • 帖子: 2292


回到 中国Spine用户