Masked image disapear on resolution change
pull/151/head
Luanrobs 2023-03-23 10:37:50 -03:00 committed by GitHub
parent b870d64b57
commit 65da10600a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 19 deletions

View File

@ -654,25 +654,8 @@ namespace Coffee.UISoftMask
/// </summary>
private static void GetDownSamplingSize(DownSamplingRate rate, out int w, out int h)
{
#if UNITY_EDITOR
if (!Application.isPlaying)
{
var res = UnityEditor.UnityStats.screenRes.Split('x');
w = Mathf.Max(64, int.Parse(res[0]));
h = Mathf.Max(64, int.Parse(res[1]));
}
else
#endif
if (Screen.fullScreenMode == FullScreenMode.Windowed)
{
w = Screen.width;
h = Screen.height;
}
else
{
w = Screen.currentResolution.width;
h = Screen.currentResolution.height;
}
w = Screen.currentResolution.width;
h = Screen.currentResolution.height;
if (rate == DownSamplingRate.None)
return;