- Изменено
BUG with skins and spine export in 3.8.75
My last version of Spine was 3.7.94
My new version is 3.8.75
I am using Corona SDK
I re exported my project and now I can errors. It's something to do with skins.
In 3.7.94 the json export looked like this:
"skins": {
"default": {
"B_Arm": {
"B_Arm": {
"x": 39.67,
"y": -0.5,
"rotation": 79.22,
"width": 38,
"height": 91
}
},
"B_Foot": {
"B_Foot": {
"x": 6.86,
"y": -2.17, ...
in 3.8.75
"skins": [
{
"name": "default",
"attachments": {
"Head": {
"Head": {
"x": 9.91,
"y": 43.45,
"rotation": -3.26,
"width": 210,
"height": 193
}
},
"Shotgun_Pump": {
"Shotgun_Pump": {
"x": 18.26,
"y": -4.3,
"width": 79,...
SkeletonJson.lua errors in the skins section
Skins.
if root["skins"] then
for skinName,skinMap in pairs(root["skins"]) do
local skin = Skin.new(skinName)
for slotName,slotMap in pairs(skinMap) do
local slotIndex = skeletonData.slotNameIndices[slotName]
---
RIGHT HERE
for attachmentName,attachmentMap in pairs(slotMap) do
local attachment = readAttachment(attachmentMap, skin, slotIndex, attachmentName, skeletonData)
if attachment then
skin:addAttachment(slotIndex, attachmentName, attachment)
end
end
end
table_insert(skeletonData.skins, skin)
if skin.name == "default" then skeletonData.defaultSkin = skin end
end
end
In the old working version skeletonData.slotNameIndices has all the attachments like B_Arm,Head,Shotgun,etc.
In the new broken version it does not. It contains "name" and that is all.
IF i change to
for slotName,slotMap in pairs(skinMap.attachments) do
instead of
for slotName,slotMap in pairs(skinMap) do
then it finds the attachments - but has other errors later on
How can I fix? This is using Spine Asset pack setup.
Also, I can run my previous export from 3.7.94 in the latest git pull of spine runtime for corona sdk - granted hardly anything changed.
Are you using the spine-corona runtime from the 3.7 branch on GitHub? If so, please change to the 3.8 branch.
Sorry about that. You were right. Simple as that.
I'm always happy about simple solutions! Thanks for reporting.