Browse Source

[unity] Fixed SkeletonRenderTexture meshFilter null when fix prefab override enabled. Closes #2608.

Harald Csaszar 1 year ago
parent
commit
7066fd939f

+ 2 - 0
spine-unity/Assets/Spine Examples/Scripts/Sample Components/SkeletonRenderTexture/SkeletonRenderTexture.cs

@@ -128,6 +128,8 @@ namespace Spine.Unity.Examples {
 		}
 
 		void RenderOntoQuad (SkeletonRenderer skeletonRenderer) {
+			if (meshFilter == null)
+				meshFilter = this.GetComponent<MeshFilter>();
 			Vector3 size = meshFilter.sharedMesh.bounds.size;
 			if (size.x == 0f || size.y == 0f) {
 				AssignNullMeshAtQuad();

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

@@ -2,7 +2,7 @@
   "name": "com.esotericsoftware.spine.spine-unity-examples",
   "displayName": "spine-unity Runtime Examples",
   "description": "This plugin provides example scenes and scripts for the spine-unity runtime.",
-  "version": "4.2.35",
+  "version": "4.2.36",
   "unity": "2018.3",
   "author": {
     "name": "Esoteric Software",