Преглед изворни кода

[unity] Fixed SkeletonGraphic RectTransform bounds not being applied at submeshes in match call. Closes #1983.

Harald Csaszar пре 3 година
родитељ
комит
2c535b65c7

+ 5 - 0
spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs

@@ -477,6 +477,11 @@ namespace Spine.Unity {
 
 
 			this.rectTransform.sizeDelta = size;
 			this.rectTransform.sizeDelta = size;
 			this.rectTransform.pivot = p;
 			this.rectTransform.pivot = p;
+
+			foreach (var submeshGraphic in submeshGraphics) {
+				submeshGraphic.rectTransform.sizeDelta = size;
+				submeshGraphic.rectTransform.pivot = p;
+			}
 		}
 		}
 
 
 		public event UpdateBonesDelegate BeforeApply;
 		public event UpdateBonesDelegate BeforeApply;