• Runtimes
  • [Unity3D, TK2D] - How do I use SetAttachment?

So I'm trying the following:

using UnityEngine;
using System.Collections;
using Spine;

public class Player_Body : MonoBehaviour {

private tk2dSpineSkeleton mySkeleton;

void Start () {
	mySkeleton = GetComponent<tk2dSpineSkeleton>();
	mySkeleton.skeleton.SetAttachment("Pill_Basic_Left_Flange", "Left_Fat_Orange");
}

}

But at run-time I get the following:

ArgumentNullException: Argument cannot be null.
Parameter name: Attachment not found: Left_Fat_Orange, for slot: Pill_Basic_Left_Flange
Spine.Skeleton.SetAttachment (System.String slotName, System.String attachmentName) (at Assets/Spine/spine-csharp/src/Skeleton.cs:185)
Player_Body.Start () (at Assets/Scripts/Player_Body.cs:11)

I feel like I am missing something VERY basic here...

Related Discussions
...

Sorry for the delayed response.

It can't find the attachment for that slot. Are the names correct? Do they exist in the JSON?