Skip to content

Commit

Permalink
fix NaN bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
hecomi committed Dec 12, 2021
1 parent 0184427 commit 9d27ad1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Assets/uWindowCapture/Runtime/UwcWindowTexture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 9d27ad1

Please sign in to comment.