You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I tried to add close button on top of the webview. As I cannot use unity UI canvas objects on top of the webview, I tried editing js code this way:
This function is called when the webview is loaded(ld). In Android it works fine, I see the close button with the correct icon. But in IOS devices, the close button does not even show. So what can affect to it in IOS devices? And maybe there are better ways to add custom button on top of the webview?
The text was updated successfully, but these errors were encountered:
Hi, I tried to add close button on top of the webview. As I cannot use unity UI canvas objects on top of the webview, I tried editing js code this way:
var buttonSize = 0.417f;
_webViewObject.EvaluateJS($@"
(function() {{
var button = document.createElement('button');
button.style.position = 'fixed';
button.style.left = '{buttonSize / 2f}in';
button.style.top = '{8}px';
button.style.zIndex = 2147483647;
button.style.width = '{buttonSize}in';
button.style.height = '{buttonSize}in';
button.style.backgroundColor = 'transparent';
button.style.color = '#413e3e';
button.style.border = 'none';
button.style.borderRadius = '50%';
button.style.fontSize = '24px';
button.style.cursor = 'pointer';
button.style.display = 'flex';
button.style.alignItems = 'center';
button.style.justifyContent = 'center';
button.style.textAlign = 'center';
This function is called when the webview is loaded(ld). In Android it works fine, I see the close button with the correct icon. But in IOS devices, the close button does not even show. So what can affect to it in IOS devices? And maybe there are better ways to add custom button on top of the webview?
The text was updated successfully, but these errors were encountered: