[unity] Fixed NullReferenceException when SkeletonGraphic SkeletonDataAsset is null. Closes #2294.

This commit is contained in:
Harald Csaszar 2023-05-26 12:20:46 +02:00
parent 9d0c069f5d
commit 72e4c2915f
2 changed files with 3 additions and 1 deletions

View File

@ -307,6 +307,7 @@ namespace Spine.Unity {
public override void Rebuild (CanvasUpdate update) {
base.Rebuild(update);
if (!this.IsValid) return;
if (canvasRenderer.cull) return;
if (update == CanvasUpdate.PreRender) {
if (requiresInstructionUpate) PrepareInstructionsAndRenderers(isInRebuild: true);
@ -401,6 +402,7 @@ namespace Spine.Unity {
}
public void LateUpdate () {
if (!this.IsValid) return;
// instantiation can happen from Update() after this component, leading to a missing Update() call.
if (!wasUpdatedAfterInit) Update(0);
if (freeze) return;

View File

@ -2,7 +2,7 @@
"name": "com.esotericsoftware.spine.urp-shaders",
"displayName": "Spine Universal RP Shaders",
"description": "This plugin provides universal render pipeline (URP) shaders for the spine-unity runtime.\n\nPrerequisites:\nIt requires a working installation of the spine-unity runtime, version 4.1.\n(See http://esotericsoftware.com/git/spine-runtimes/spine-unity)",
"version": "4.1.12",
"version": "4.1.13",
"unity": "2019.3",
"author": {
"name": "Esoteric Software",