[unity] Fixed a compile error on Unity 2017.1 introduced by previous commit 91cc6dd. See #1640.

This commit is contained in:
Harald Csaszar 2023-03-24 15:00:26 +01:00
parent e7457546b0
commit 25b8310bea

View File

@ -588,7 +588,7 @@ namespace Spine.Unity {
if (parentTransform)
parentSize = parentTransform.rect.size;
}
Vector2 anchorAreaSize = target.rectTransform.anchorMax * parentSize - target.rectTransform.anchorMin * parentSize;
Vector2 anchorAreaSize = Vector2.Scale(target.rectTransform.anchorMax - target.rectTransform.anchorMin, parentSize);
target.rectTransform.sizeDelta = size - anchorAreaSize;
}