Loading a local file to webview in U3DXT

Hi,

Right now I am trying to load a local pdf file into the webview using your plugin. So far I am failing miserably. I do not know why its not working and any support from you is greatly appreciated. Here is what I got so far but it is not working.

    url = Application.persistentDataPath+"/smallPDF.pdf";
    _url = new NSURL(url, false); //This should be the equivalent of [NSURL fileURLWithPath:path] if I read it correctly?
_request =  new NSURLRequest( _url );
_webview.LoadRequest(_request);

I hope you can set me on the right path here as time is tight on this project.

Are you sure the file exists? You can check using File.Exists(url). And you can also try the NSURL constructor without the boolean.

url = Application.persistentDataPath+"/smallPDF.pdf";
if (!File.Exists(url)) {
    Debug.Log("File doesn't exist.");
    return;
}

_url = new NSURL(url);  // equivalent to native [[NSURL alloc] initWithString:]
_request =  new NSURLRequest( _url );
_webview.LoadRequest(_request);