Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Gida on February 26, 2016, 08:16:16 AM
-
Hey! Whats the best way to open a Document like a PDF from within the game with playmaker is there an action?
Greetings :)
-
maybe this will help: http://www.francescogallorini.com/2011/02/unity-sharp-pdf/
-
Hey and many thanks. But I simply want to launch a PDF in the external Reader on a button Press. :)
-
Hi,
for which platform are you building?
-
Hey Dino,
PC / MAC
-
got something?
-
If you are on PC/Mac, try this in a C# script (edit path to whatever)
System.Diagnostics.Process.Start(@"c:\myPdf.pdf");
-
THNX, will try :)
-
Worked like a charm :) Thank you, solved
-
hm but not from touch. is there another solution???
-
what do you mean by touch? You mean from a mobile device?
-
Hi,
I think ive got a problem with the path. The Document should be launched from the root Folder so I replaced "c:\myPdf.pdf" with ..\myPdf.pdf".
1st Question : Is this correct?
2nd Question: shall I put it in the update or start function?
Greetz
EDIT:
when testing and switching to runtime, where should the
-
Try this action.. let me know if it works in the build (so that i can put on the ecosystem).
This is only for OS & Win (maybe mobile!!! - it should work but not tested) and uses System.Diagnostics.Process.Start
I tested with a picture from dropdown Mypictures and it works for me.
Thx
-
Hi dudebxl,
I'm trying you action that i'm very interested in.
It works fine when the .pdf is in "my pictures" windows folder, but I can't have it work with the .pdf file in the Game Asset Folder. Sorry if it sounds dummy.
My setup is :
filename : temp.pdf; file path : temp.pdf; set path : streaming asset path
and the temp.pdf file in the Asset folder.