From 9d27ad18d14449e362e436f41058327da2520fff Mon Sep 17 00:00:00 2001 From: hecomi Date: Sun, 12 Dec 2021 22:30:30 +0900 Subject: [PATCH] fix NaN bug. --- Assets/uWindowCapture/Runtime/UwcWindowTexture.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Assets/uWindowCapture/Runtime/UwcWindowTexture.cs b/Assets/uWindowCapture/Runtime/UwcWindowTexture.cs index e79e92d..db463a8 100644 --- a/Assets/uWindowCapture/Runtime/UwcWindowTexture.cs +++ b/Assets/uWindowCapture/Runtime/UwcWindowTexture.cs @@ -297,6 +297,9 @@ void UpdateScale() } } + if (float.IsNaN(scale.x)) scale.x = 0f; + if (float.IsNaN(scale.y)) scale.y = 0f; + transform.localScale = scale; }