- Home /
Unity Webview Customisation Help
Hi
I downloaded Unity webview from the link: https://github.com/gree/unity-webview
I'm using this with Android and everything is working but the webview overlay is taking up the entire screen area and I want to put a unity GUI button below the webview.
I've looked at the project files and there is SampleWebView.cs, WebViewObject.cs and AndroidManifest.xml
Please can someone explain what I need to change in the code to make the webview area smaller?
I think this might be controlled in the WebViewObject.cs script but am not sure what to change.
Thanks for any help with this
Hey, I'm trying to use the same plugin but with no success. I've opened the sample project and imported the packaged but when I try to run it gives the following error: DllNotFoundException: WebView. Do you know how to solve this?
Hy, I've tried running same sample as you but it gives me one error:
DllNotFoundException: WebView WebViewObject.Init (System.Action`1 cb) (at Assets/Plugins/WebViewObject.cs:118) SampleWebView.Start () (at Assets/Scripts/SampleWebView.cs:32)
Also unity made an upgrade...could this be the problem?
Do you have any idea?
Thank you !
I know this is an old thread but I was here looking for this same error and I found the answer, these scripts will NOT run on windows, and must run on android, you will get the DLLnotfound error when trying to run within the editor. If you run on android it works just fine.
Answer by siberman · Jun 23, 2013 at 06:44 AM
Hey man,
Try calling
webViewObject.SetMargins( 0, 0, 0, Screen.height/10 );
with whatever values you like.
Hy, I've tried running same sample as you but it gives me one error:
DllNotFoundException: WebView WebViewObject.Init (System.Action`1 cb) (at Assets/Plugins/WebViewObject.cs:118) SampleWebView.Start () (at Assets/Scripts/SampleWebView.cs:32)
Also unity made an upgrade...could this be the problem?
Do you have any idea?
Thank you !
Answer by VictorPinto90 · Aug 04, 2013 at 10:24 PM
Try this on a Android or iOS device
webViewObject.LoadURL(Url);
webViewObject.SetVisibility(true);
webViewObject.SetMargins(50,50,50,50);
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
A node in a childnode? 1 Answer
two way communication between the unity and streamingassets web page for android 0 Answers
eulerangle not work with joystick 0 Answers