[unity] Fixed ShaderGraph shaders not displayed at PartsRenderers on Unity 2023.1. Closes #2358.

This commit is contained in:
Harald Csaszar 2023-09-07 13:12:24 +02:00
parent aa0b9d57ca
commit 238818dd13
2 changed files with 4 additions and 4 deletions

View File

@ -207,7 +207,8 @@ namespace Spine.Unity {
int rendererCount = partsRenderers.Count;
if (rendererCount <= 0) return;
if (copyPropertyBlock)
bool assignPropertyBlock = this.copyPropertyBlock && mainMeshRenderer.HasPropertyBlock();
if (assignPropertyBlock)
mainMeshRenderer.GetPropertyBlock(copiedBlock);
MeshGenerator.Settings settings = new MeshGenerator.Settings {
@ -234,9 +235,8 @@ namespace Spine.Unity {
MeshGenerator meshGenerator = currentRenderer.MeshGenerator;
meshGenerator.settings = settings;
if (copyPropertyBlock)
if (assignPropertyBlock)
currentRenderer.SetPropertyBlock(copiedBlock);
// Render
currentRenderer.RenderParts(instruction.submeshInstructions, start, si + 1);

View File

@ -2,7 +2,7 @@
"name": "com.esotericsoftware.spine.spine-unity",
"displayName": "spine-unity Runtime",
"description": "This plugin provides the spine-unity runtime core.",
"version": "4.1.19",
"version": "4.1.20",
"unity": "2018.3",
"author": {
"name": "Esoteric Software",