guidez

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...
guidez
  • 記事: 13

Nate

Sorry for the delayed response.

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

Nate
  • 記事: 11544


Return to Runtimes