[unity] Fixed previous commit not compiling in Unity 2017 due to Vector2.operator* not being supported yet (commit 2bc8827). See #1871.

This commit is contained in:
Harald Csaszar 2021-04-02 12:45:55 +02:00
parent 2bc88270d4
commit a24c6600f5

View File

@ -539,7 +539,7 @@ namespace Spine.Unity.AttachmentTools {
float scaleX = (float)(sourceTexture.width) / (float)(ar.page.width);
float scaleY = (float)(sourceTexture.height) / (float)(ar.page.height);
var scale = new Vector2(scaleX, scaleY);
r = new Rect(r.position * scale, r.size * scale);
r = new Rect(Vector2.Scale(r.position, scale), Vector2.Scale(r.size, scale));
}
int width = (int)r.width;