badlogic wroteDoes your skeleton not have attachments in its default skin? Do you have other skins than the empty default skin? Then you have to set a skin first, e.g. like this:
[skeletonNode setSkin:@"your-skin-name-here"];
You are setting the skin in the 5th code line in your code above. Just change the name to the skin you want to use.
Really appreciate for your reply. My myskeleton.json
has default
skins, followed by another skin json node, see this
"skins": {
"default": {
"1x/shadow": {
"shadow": {
"y": 6.15,
"scaleX": 0.542,
"rotation": 360,
"width": 203,
"height": 27
}
},
"base_body": {
"body": {
"color": "ce7272ff",
"x": 56.64,
"rotation": -90,
"width": 36,
"height": 99
}
},
"base_head": {
"head": {
"color": "ce7272ff",
"x": 51.38,
"rotation": -90,
"width": 54,
"height": 55
}
},
"base_left_foot": {
"foot_left": {
"color": "ce7272ff",
"x": 14.43,
"y": -8.58,
"scaleX": 0.995,
"rotation": 89.42,
"width": 29,
"height": 24
}
},
"base_left_hand": {
"left_hand": {
"color": "ce7272ff",
"x": 1.59,
"y": -0.2,
"scaleX": 0.5,
"scaleY": 0.5,
"rotation": -89.27,
"width": 20,
"height": 20
}
},
"base_left_lower_arm": {
"left_lower_arm": {
"color": "ce7272ff",
"x": 23.11,
"y": 0.46,
"rotation": 103.96,
"width": 25,
"height": 55
}
},
"base_left_lower_leg": {
"left_lower_leg": {
"color": "ce7272ff",
"x": 38.31,
"y": 0.06,
"rotation": 89.87,
"width": 10,
"height": 72
}
},
"base_left_upper_arm": {
"left_upper_arm": {
"color": "ce7272ff",
"x": 33.48,
"y": -0.05,
"rotation": 106.91,
"width": 25,
"height": 57
}
},
"base_left_upper_leg": {
"lower_upper_leg": {
"color": "ce7272ff",
"x": 28.81,
"y": -0.8,
"rotation": 89.11,
"width": 10,
"height": 74
}
},
"base_right_foot": {
"foot_right": {
"color": "ce7272ff",
"x": 14.41,
"y": 8.3,
"rotation": 90.87,
"width": 29,
"height": 24
}
},
"base_right_hand": {
"right_hand": {
"color": "ce7171ff",
"x": 2.75,
"y": 2.14,
"scaleX": 0.5,
"scaleY": 0.5,
"rotation": -89.55,
"width": 20,
"height": 20
}
},
"base_right_lower_arm": {
"right_lower_arm": {
"color": "ce7171ff",
"x": 23.28,
"y": -1.34,
"rotation": 72.02,
"width": 24,
"height": 55
}
},
"base_right_lower_leg": {
"right_lower_leg": {
"color": "ce7171ff",
"x": 38.32,
"y": -0.83,
"rotation": 89.69,
"width": 10,
"height": 72
}
},
"base_right_upper_arm": {
"right_upper_arm": {
"color": "ce7171ff",
"x": 33.47,
"y": -0.98,
"rotation": 72.2,
"width": 25,
"height": 57
}
},
"base_right_upper_leg": {
"right_upper_leg": {
"color": "ce7171ff",
"x": 28.82,
"y": 0.23,
"rotation": 90.44,
"width": 10,
"height": 74
}
},
"base_waist": {
"waist": {
"color": "ce7171ff",
"y": 3.57,
"scaleX": 0.471,
"scaleY": 0.392,
"width": 34,
"height": 34
}
}
},
I already set the skin to default with
[skeletonNode setSkin:@"default"];
Or should I manually set all skin listed in my myskeleton.json
'skin?