Unity wont launch PDF when built, works in editor

Hi,

I’m try to open a pdf from a unity standalone application. I’ve used the following
methods:

Process.Start(Application.dataPath + “//PDFs//” + fileName + “.pdf”);

&

Application.OpenURL(Application.dataPath + “//PDFs//” + fileName + “.pdf”);

Both work fine in the editor but doesn’t work when i build the application.

Have you read the documentation about how the value of Application.dataPath changes for each platform?

If you’re in the Editor, it will return the Assets folder.

If you’re doing a Standalone build, it returns something different.