• Runtimes
  • Unity Runtime 3.4.0 SkinnedMeshAttachment.cs Error

Hi friends,

I updated to latest runtime, I fixed some errors, remain only one can't fix it, in SkinnedMeshAttachment, I get this error:

Assets/spine-csharp/Attachments/SkinnedMeshAttachment.cs(110,66): error CS1061: Type `Spine.Bone' does not contain a definition for `m00' and no extension method `m00' of type `Spine.Bone' could be found

This is part of script:

public void ComputeWorldVertices (Slot slot, float[] worldVertices) {
   Skeleton skeleton = slot.bone.skeleton;
   ExposedList<Bone> skeletonBones = skeleton.bones;
   float x = skeleton.x, y = skeleton.y;
   float[] weights = this.weights;
   int[] bones = this.bones;
   if (slot.attachmentVerticesCount == 0) //*fix this by replacing with: attachmentVertices.Count
{ 
      for (int w = 0, v = 0, b = 0, n = bones.Length; v < n; w += 2) {
         float wx = 0, wy = 0;
         int nn = bones[v++] + v;
         for (; v < nn; v++, b += 3) {
            Bone bone = skeletonBones.Items[bones[v]];
            float vx = weights[b], vy = weights[b + 1], weight = weights[b + 2];
           //HERE: bone.m00, bone.m01,, bone.m10, bone.m01
          //ERROR: 'Bone' does not contain a definition for 'm10' and no extension method 'm10' accepting a first argument of type 'Bone' could be found (are you missing a using directive or an assembly reference?) 
            wx += (vx * bone.m00 + vy * bone.m01 + bone.worldX) * weight;
            wy += (vx * bone.m10 + vy * bone.m11 + bone.worldY) * weight;
         }
         worldVertices[w] = wx + x;
         worldVertices[w + 1] = wy + y;
      }
   } else {
      float[] ffd = slot.AttachmentVertices; //*this fixed by replacing wit: slot.attachmentVertices.Items
      for (int w = 0, v = 0, b = 0, f = 0, n = bones.Length; v < n; w += 2) {
         float wx = 0, wy = 0;
         int nn = bones[v++] + v;
         for (; v < nn; v++, b += 3, f += 2) {
            Bone bone = skeletonBones.Items[bones[v]];
            float vx = weights[b] + ffd[f], vy = weights[b + 1] + ffd[f + 1], weight = weights[b + 2];
           //HERE THE SAME ISSUE: bone.m00, bone.m01,, bone.m10, bone.m01
          //ERROR: 'Bone' does not contain a definition for 'm10' and no extension method 'm10' accepting a first argument of type 'Bone' could be found (are you missing a using directive or an assembly reference?) 
            wx += (vx * bone.m00 + vy * bone.m01 + bone.worldX) * weight;
            wy += (vx * bone.m10 + vy bone.m11+ bone.worldY) * weight;
         }
         worldVertices[w] = wx + x;
         worldVertices[w + 1] = wy + y;
      }
   }
}

Any suggestions, how to fix this please🙁 ?

Thanks in advance!

Related Discussions
...

Ah! This was described under "important notes when upgrading": Spine Unity Download

Delete your spine-csharp folder before upgrading to 3.3 or 3.4.

At this point, you can also delete spine-csharp and import again.

Ok, my mistake 😉

Thanks for quick reply Pharan!