Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to load an html webpage inside unity3d

I want to show a webpage inside unity3d without making it an image and load it via a WWW class.

I have seen that there are plugins, but I would like to load the web page without one.

like image 545
Amir Jaouani Avatar asked Oct 19 '17 09:10

Amir Jaouani


People also ask

How do I load an HTML file into Unity?

You can load local HTML files through the web view if you put them to the StreamingAssets folder open in new window ( Assets/StreamingAssets/ folder in the Unity project).

How do you display web pages in Unity?

Basically, you can place the prefabs in a scene or canvas, give it a URL, and it will automatically display the web content and handle user interaction.

Can you use HTML in Unity?

The HTML file generated by Unity when building a web player contains all the commonly required functionality. In most cases you don't have to modify the HTML file at all.


1 Answers

  1. You need a plugin because the best way to do what you want is "webview"

  2. If you really don't want to use a plugin, then use Applicaion.OpenUrl instead. This will open web pages, but not inside the unity window. It will open a browser application and show webpage.

  3. If you want to use a plugin, check this github https://github.com/gree/unity-webview

like image 123
yp86 Avatar answered Sep 28 '22 20:09

yp86