Skip to content

Commit

Permalink
fix: an exception is thrown when the game view is inactive
Browse files Browse the repository at this point in the history
close #104
  • Loading branch information
mob-sakai committed Sep 27, 2020
1 parent c369f47 commit 97e5a21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Packages/SoftMaskForUGUI/Scripts/SoftMask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -674,8 +674,8 @@ private static void GetDesamplingSize(DesamplingRate rate, out int w, out int h)
{
#if UNITY_EDITOR
var res = UnityEditor.UnityStats.screenRes.Split('x');
w = int.Parse(res[0]);
h = int.Parse(res[1]);
w = Mathf.Max(64, int.Parse(res[0]));
h = Mathf.Max(64, int.Parse(res[1]));
#else
w = Screen.width;
h = Screen.height;
Expand Down

0 comments on commit 97e5a21

Please sign in to comment.