浏览代码

[unity] Fixed NaN issue when `SkeletonGraphic.MatchRectTransform()` is called after manual `Initialize()` without following `Update(0)`.

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

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

@@ -412,6 +412,7 @@ namespace Spine.Unity {
 		}
 
 		public bool MatchRectTransformWithBounds () {
+			if (!wasUpdatedAfterInit) Update(0);
 			UpdateMesh();
 
 			if (!this.allowMultipleCanvasRenderers)