소스 검색

[unity] Fixed SkeletonGraphic newly added SkeletonSubmeshGraphic having wrong offset. Closes #2433.

Harald Csaszar 1 년 전
부모
커밋
dd81e4b062
2개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 0
      spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs
  2. 1 1
      spine-unity/Assets/Spine/package.json

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

@@ -1001,6 +1001,10 @@ namespace Spine.Unity {
 				SkeletonSubmeshGraphic submeshGraphic = go.AddComponent<SkeletonSubmeshGraphic>();
 				submeshGraphic.maskable = this.maskable;
 				submeshGraphic.raycastTarget = false;
+				submeshGraphic.rectTransform.pivot = rectTransform.pivot;
+				submeshGraphic.rectTransform.anchorMin = Vector2.zero;
+				submeshGraphic.rectTransform.anchorMax = Vector2.one;
+				submeshGraphic.rectTransform.sizeDelta = Vector2.zero;
 				submeshGraphics.Add(submeshGraphic);
 			}
 		}

+ 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.31",
+	"version": "4.1.32",
 	"unity": "2018.3",
 	"author": {
 		"name": "Esoteric Software",