badlogic wrotePlease post the full stack trace for the exception. My guess is that spSkeletonData_findSkin()
returns NULL
, which means the skin couldn't be found.
After debug then I realized, there is something wrong in spSkin_addSkin
function, in this line
entry = spSkin_getAttachments(other);
while (entry) {
spSkin_setAttachment(self, entry->slotIndex, entry->name, entry->attachment);
entry = entry->next;
}
while
block is running for a while, entry
per entry
, then after the entry.name
is face1
, then the entry
is NULL and crashed. This is my asset https://drive.google.com/open?id=1CSXknVpcQ2RL8FGi8HVIg9g0Dp6mbtdi Thank you!
filterSekai wrotebadlogic wrotePlease post the full stack trace for the exception. My guess is that spSkeletonData_findSkin()
returns NULL
, which means the skin couldn't be found.
After debug then I realized, there is something wrong in spSkin_addSkin
function, in this line
entry = spSkin_getAttachments(other);
while (entry) {
spSkin_setAttachment(self, entry->slotIndex, entry->name, entry->attachment);
entry = entry->next;
}
while
block is running for a while, entry
per entry
, then after the entry.name
is face1
, then the entry
is NULL and crashed. This is my asset https://drive.google.com/open?id=1CSXknVpcQ2RL8FGi8HVIg9g0Dp6mbtdi Thank you!
Hi @badlogic,
My fault. There are no "base_head" and "base_body" in my json skeleton skin. But I think I still have a question, how to apply spSkin
object into our skeletonData?
spSkin* skin = spSkin_create("default");
spSkin_addSkin(skin, spSkeletonData_findSkin(skeletonData, "face"));
spSkin_addSkin(skin, spSkeletonData_findSkin(skeletonData, "bottom_short"));
I created custom skin
and I read in spine-runtimes/main.cpp at 3.8 but still have no clue how to add into our skeletonData. Tried to look at the example code, but found nothing. Thank you.