-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to resize webview object to prevent fullscreen view? #810
Comments
You can utilize SetMargins() as in the sample app:
|
I try to show what I understand from your extention. Firstly I try to show something inside SampleWebView script. I want to ask some questions. How to use these formulas when the position of window change? If the position of panel is center of screen there is no problem, but if I change the position for example left corner with some margins do I have to provide another formulas or solutions to do that? Is there a function or a way which provided from you? For example, let say there is function. First parameter is position on screen, second parameter is size on screen like SetWindow(Vector2 pos, Vector2 size) |
You can align a WebView to a RectTransform as described in #567 (comment) . Also, SetMargins() internally cache margins and don't perform an actual update if margins don't change, so you can call it in every Update() to keep the WebView aligned. |
Tomorrow, I will check it. Thanks. |
I tried but result was unexpected. |
I made an example below: which realizes the logic described in #810 (comment) . Please check this example. |
No description provided.
The text was updated successfully, but these errors were encountered: