Open ankursahu19 opened 5 years ago
You can utilize webViewObject.LoadURL()
to load a url:
You may also utilize JavaScript through webViewObject.EvaluateJS()
:
webViewObject.EvaluateJS("location.replace('https://developer.mozilla.org/en-US/docs/Web/API/Location#Methods');")
How to dynamically change url ? like enter url on inputfield and on button clicked open webpage.
This plugin doesn't provide any UI for address bar, etc. You can create them by uGUI.
I have created a textfield and GUI button to open given url but i am not able to enter text in text box here is my code public string txtc; void OnGUI() { txtc = GUI.TextField(new Rect(x, 10, 180, 80), txtc,50); //x += 290;
if (GUI.Button (new Rect (300, 10, 180, 80), "GO !!")) {
Debug.Log("<color=yellow> THIS is url </color>"+ txtc);
webViewObject.LoadURL(txtc);
}
}
I'm sorry, the current implementation for OSX/Editor is incomplete about keyboard event emulation. I would like to fix it in the future, but it will take some time. Your code should work well on iOS/Android devices.
I reduced the issue a bit in #739 and updated binaries. Could you please try the latest?
Thanks for your reply @KojiNakamaru I have made some changes on sample.html and it is working for me on Unity App.
Is there any function that will help me for dynamically change url Thanks!