- Home /
How to load a webpage inside an Unity3d application?
I am in need of displaying a webpage inside my Unity3d app (for implementing Single Sign On for my game).
I read about 'Application.loadURL()' method, but it opens up the link inside the default browser app.
I need to display the webpage in the app screen itself (something like WebView in Native Android SDK)
Kindly guide me if it is possible natively or through any plugins?
Any information on this topic will be welcomed.
@anilhdas I thing you must write your own plugin for this. There is following guide link. How to create android plugin for Unity.
http://www.thegamecontriver.com/2015/04/android-plugin-unity-android-studio.html
Best of luck!
Answer by anilhdas · Mar 23, 2017 at 10:14 AM
Thank you @saud_ahmed020.
As me and my team-mate figured it out the hard way,
Unity doesn't natively support displaying a live web page as a part of the game (Makes sense since Unity is not primarily built for that).
But there are various assets available in Unity's asset store like this one which enables the functionality for you.
Hope it helps someone who is searching for similar requirements. Happy developing :-).
I need to open payment URL in webview inside unity. Till here I'm successful using uniwebview plugin for unity. Now after I enter the card details on the payment page, n click pay now, a new page should popup open for entering a password but this popup is not supported in webview. I need your help to allow this second popup to open as well. Do you have any idea to tackle it
@jumanshettymj did you find out for payment? I'm also stuck here and if yes how did you manage callbacks of success and failure?
Answer by vuplex · Jan 20, 2019 at 07:22 AM
If you're interested in displaying the web content in 3D, check out my 3D WebView plugin for Android, iOS, Windows, macOS, and UWP. It provides a prefab and simple API that makes this really easy.
Unity doesn't have a built-in webview, so a plugin is needed.
Answer by ramkesh · Jun 04, 2019 at 09:12 AM
Here is free Plugin for Unity Android and iOS. Web view . For reference check out my Tutorial.
Answer by Mayank516 · Aug 31, 2021 at 03:56 AM
I have resolved it by using a native plugin from unity assed store. Plugin is very descriptive and easy to use.
Link for Android Web View plugin is : https://assetstore.unity.com/packages/tools/integration/web-view-in-android-196400?_ga=2.204559507.2019751075.1630346393-1210468855.1614581919
Link for iOS Web View plugin is : https://assetstore.unity.com/packages/tools/integration/web-view-in-ios-96858?_ga=2.204559507.2019751075.1630346393-1210468855.1614581919