浏览代码

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

Harald Csaszar 3 年之前
父节点
当前提交
2c535b65c7
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs

+ 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;