From b233e8875494c89d33b607709ee564e5e0a7672a Mon Sep 17 00:00:00 2001 From: Koji Nakamaru Date: Sat, 5 Dec 2020 00:57:51 +0900 Subject: [PATCH] adjusted SetMargins() not to return on mobile platforms when margins are unchanged, as code for android should always be called. --- plugins/WebViewObject.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/WebViewObject.cs b/plugins/WebViewObject.cs index 57281e0c..13058152 100644 --- a/plugins/WebViewObject.cs +++ b/plugins/WebViewObject.cs @@ -455,6 +455,7 @@ public void SetMargins(int left, int top, int right, int bottom, bool relative = #if UNITY_WEBPLAYER || UNITY_WEBGL #elif UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN || UNITY_EDITOR_LINUX //TODO: UNSUPPORTED + return; #elif UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX if (webView == IntPtr.Zero) return; @@ -465,6 +466,7 @@ public void SetMargins(int left, int top, int right, int bottom, bool relative = if (webView == null) return; #endif +#if UNITY_EDITOR || UNITY_STANDALONE if (mMarginLeft == left && mMarginTop == top && mMarginRight == right @@ -472,6 +474,7 @@ public void SetMargins(int left, int top, int right, int bottom, bool relative = { return; } +#endif mMarginLeft = left; mMarginTop = top; mMarginRight = right;