Prechádzať zdrojové kódy

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

Harald Csaszar 2 rokov pred
rodič
commit
238818dd13

+ 3 - 3
spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonRenderSeparator/SkeletonRenderSeparator.cs

@@ -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);
 

+ 1 - 1
spine-unity/Assets/Spine/package.json

@@ -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",