Browse Source

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

Harald Csaszar 3 years ago
parent
commit
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.pivot = p;
+
+			foreach (var submeshGraphic in submeshGraphics) {
+				submeshGraphic.rectTransform.sizeDelta = size;
+				submeshGraphic.rectTransform.pivot = p;
+			}
 		}
 
 		public event UpdateBonesDelegate BeforeApply;