Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: PolyMad on May 03, 2020, 09:12:06 AM
-
I got this script that I would call at the pression of a key:
https://github.com/yasirkula/Unity360ScreenshotCapture/#example-code
But I can't add the script to an object because Unity says that the "script class can't be abstract".
-
Hi.
Best is to ask the author
-
Uhhh but it's a simple script... he doesn't know how Playmaker works.
I think this is a Playmaker setup, no?
-
Hi.
Adding script to an object has nothing to do with playmaker :)
The script has also a get key down where you can change the keycode if you wish.
Did you import the package?
-
Yes I imported it.
But what I wanted to do was to call it from Playmaker, but have all the rest managed by Playmaker, included the keypress.
So I would exclude the keypress from the script, and just call the screenshot function after a keypress call from Playmaker.
-
Hi.
best way is to make a custom action.
here's a video on making custom actions :
Else you can use 'Call Method' action,
but then you would potentially also need to use 'Linker Wizard (http://hutonggames.com/playmakerforum/index.php?topic=11126.0)'
-
Hi.
I had a little extra time today, so i went ahead and made action for this.
You do not need to put any component only install the asset.
Then add the package in the attachment below and look for the 'I360 capture' action.
on the action you can set image width and if you set to 0 or higher thant 8192 it will show a error on the action itself.
default it saves as png, but you can set checkbox 'Save As JPEG' to save as jpeg file.
for Face camera direction, i am not sure what the difference will be, but the asset has this option so i added this as well.
Save name will be the name of the file, do not include Extension (.jpg/.png)
if Overwrite Existing File is Checked it will overwrite the existing file.
for filepath you can set your own file path (or make a setup so player can select directory to save.
if set to none it will use the persistentDataPath
you can optionally select a camera, if none, it will use the main camera.
the file exists event will be triggered IF Overwrite Existing File is not Checked and the file already exists.
(https://i.imgur.com/AfOfSHw.png)
-
Wow! Thank you very very much, man!
This will help me greatly in promotion (I hope).
-
Hi,
Not sure what you mean by promotion.
But happy to help :)
-
Taking snapshots to show off my project in the devlog :D
-
Hi.
Oh that kind of promotion :D
i was thinking you would get a promotion on your job lol :)
-
Hi again.
I think the action is working, but I can't find WHERE the screenshots are saved.
I'm trying to save them to C: but there seem to be no way to find them.
I'm almost sure the action is working, because I also send different event if an existing screenshot is found, and there's a micro pause when I hit the button to take the screenshot, so the action is being definitely passed, but where the hellllllll??!?!?!?!?
-
user/appdata/localow/<yourcompanyname>
maybe ?
-
Yeah it's there, I was looking right now, and with a search on C: with windows, I found it.
But then the path field does not work somehow: I tried to input a straight path taken from the Windows Explorer window, and that should work.
Tried with just C: didn't work too.
Don't know what's the problem here.