UniWebViewHelper

Summary

Methods Summary

Get the local streaming asset path for a given file path related to the StreamingAssets folder.

Get the local persistent data path for a given file path related to the data folder of your host app.

Methods

Get the local streaming asset path for a given file path related to the StreamingAssets folder.

This method will help you to create a URL string for a file under your StreamingAssets folder for different platforms.

Parameters
  • string path

    The relative path to the Assets/StreamingAssets of your file.

    For example, if you placed an HTML file under Assets/StreamingAssets/www/index.html, you should pass www/index.html as the parameter.

Example

var url = UniWebViewHelper.StreamingAssetURLForPath("www/localHTML.html");
webView.Load(url);

Get the local persistent data path for a given file path related to the data folder of your host app.

This method will help you to create a URL string for a file under you stored in the persistentDataPath.

Parameters
  • string path

    The relative path to the Assets/StreamingAssets of your file.

Example

var url = UniWebViewHelper.PersistentDataURLForPath("www/index.html");
webView.Load(url);