P
P
PuHaT2019-08-12 14:58:33
HTML
PuHaT, 2019-08-12 14:58:33

Unity3d - how to open offline web pages in a browser window?

Good afternoon!
There are many reviews of opening third-party sites in unity on the Internet, the question is:
How to open local pages in a unity project, and also where to store .html files in a project? If possible, please show the script. Thank you for your attention.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PuHaT, 2019-08-12
@PuHaT

The solution to the problem is as follows:
1. It is necessary to create the StreamingAssets folder in the Assets directory
2. Attach the necessary files to the StreamingAssets folder
3. Write the script:
string _Path = Application.streamingAssetsPath + "/page1/index.html";
Application.OpenURL(_Path);
4. Everything works

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question