Opening a local html file in UniWebView?

894 Views Asked by At

I have a class which check for internet availability, if there is not internet then it is suppose to load the file in UiWebView(I am using UniWebView).

    if(!isInternetAvailable())
    {
        _webView.insets = new UniWebViewEdgeInsets(0,0,0,0);
        _webView.url = Application.streamingAssetsPath + "/File.html";
        _webView.Load();
    }

i cannot figure out what is wrong. I have the file stored in StreamingAssets folder. please help out. Been stuck on this for hours.

1

There are 1 best solutions below

0
On

I'm afraid that the way you read files from StreamingAssets is incorrect, as the method to access StreamingAssets diverts in different OS.

Please check Unity Manual about it.