Skip to content
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

WebView setMargin #835

Open
eb0KrY4k opened this issue Aug 30, 2022 · 4 comments
Open

WebView setMargin #835

eb0KrY4k opened this issue Aug 30, 2022 · 4 comments

Comments

@eb0KrY4k
Copy link

image
Good afternoon, is there a way to specify the dimensions of the webview through the canvas (example green color)? If you turn on the status bar, then the web view is superimposed on the header (example is blue)

@KojiNakamaru
Copy link
Member

#567 (comment) shows an example code to align a webview to RectTransform. A more complete example branch can be found in #816 .

@zayddawood
Copy link

#567 (comment) shows an example code to align a webview to RectTransform. A more complete example branch can be found in #816 .

@KojiNakamaru - thanks for the complete example branch. However, I'm a little confused with the output of this. Publishing it out-of-the-box with no editing to the source, results in very odd output - it doesn't seem to constrain to the "Image" gameobject:

image

@KojiNakamaru
Copy link
Member

Thank you for the report. I tested this example for webgl and found setMargins' bug, which was fixed in #846 . I also updated this example to be directly built for webgl. Please note that you still need to copy TemplateData from your Unity installation (cf. https://github.com/gree/unity-webview/tree/151053c9058c7a740f09139c6b2ebe89b8e9d44b#webgl ).

@zayddawood
Copy link

Thank you for the report. I tested this example for webgl and found setMargins' bug, which was fixed in #846 . I also updated this example to be directly built for webgl. Please note that you still need to copy TemplateData from your Unity installation (cf. https://github.com/gree/unity-webview/tree/151053c9058c7a740f09139c6b2ebe89b8e9d44b#webgl ).

Cheers - I can confirm everything works fine now. Thank you for spending the time looking into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants