ChenTotal

I use SkeletonGraphic in my UI on 3.7.
After I upgraded to 3.8, I got an error.

1.
In SkeletonGraphic.cs, it called
public void LateUpdate () {
if (freeze) return;
//this.SetVerticesDirty(); // Which is better?
UpdateMesh();
}
2.
In SkeletonGraphic.cs, it called
MeshGenerator.GenerateSingleSubmeshInstruction(currentInstructions, skeleton, null);
3.
In MeshGenerator.cs, it called
current.material = (Material)((AtlasRegion)rendererObject).page.rendererObject;
And I got a error
[Exception] NullReferenceException: Object reference not set to an instance of an object
I tracked the code, it showed rendererObject is null.
Is this a bug??
ChenTotal
  • Beiträge: 9

badlogic

I'm afraid this is not enough information. We need to be able to reproduce the NullReferenceException. Could you send us a small example that demonstrates the issue?
Benutzeravatar
badlogic

Mario
  • Beiträge: 2099

ChenTotal

This is my example, includes spine files and unity project.
https://mega.nz/#!3X5xXSCB!-kRAR-m3jDHNgwpZVBw286K1aNa6dP0evRzkHU1UDTU

In unity, open SampleScene. There are 2 objects under Canvas Error and Empty.
Both trigger unity to log error message.
The object "Empty" is support to show nothing, but in Spine 3.8 it would show a puzzle.
ChenTotal
  • Beiträge: 9

badlogic

I can reproduce the issue using our repro, thanks! The part of the code that errors does so because it can not find an attachment for the slot 3_GetBrokenCard_EFF03 in the TEST_Empty skeleton.

https://marioslab.io/uploads/screenshots/DFp21OMbF0.png

The TEST_Error skeleton doesn't seem to have that problem. I couldn't figure out why TEST_Empty errors yet, I'll get back to you once we know what's going on.
Benutzeravatar
badlogic

Mario
  • Beiträge: 2099

badlogic

Ah, found it. The Empty animation has an attachment key in the first frame

https://marioslab.io/uploads/screenshots/hicUJf0GY6.png

In the setup pose, the attachment isn't set on the slot. MeshGenerator doesn't take the possibility that not a single attachment is set into account. It shouldn't add an instruction in that case, as there's nothing to render.

I've created an issue for this here: https://github.com/EsotericSoftware/spine-runtimes/issues/1491

Thanks for reporting!
Benutzeravatar
badlogic

Mario
  • Beiträge: 2099

ChenTotal

If you fix this issue, would that fix the problem that the empty object should show nothing?
ChenTotal
  • Beiträge: 9

badlogic

Jupp, that should fix that as well.
Benutzeravatar
badlogic

Mario
  • Beiträge: 2099

Harald

This issue has now been fixed. You can download updated unitypackages here as usual:
Spine Unity Download

Thanks for reporting!
Benutzeravatar
Harald

Harri
  • Beiträge: 1096


Zurück zu Bugs