playMaker

Author Topic: [SOLVED] Take JPG Screenshots  (Read 2809 times)

A3DStudio

  • Playmaker Newbie
  • *
  • Posts: 43
    • View Profile
    • A3DStudio
[SOLVED] Take JPG Screenshots
« on: July 12, 2012, 03:37:28 PM »
Hello, it is possible to modify the "Take Screenshot" action, to working on a android device and with JPG encode?
« Last Edit: January 08, 2013, 08:56:17 AM by A3DStudio »

A3DStudio

  • Playmaker Newbie
  • *
  • Posts: 43
    • View Profile
    • A3DStudio
Re: Take JPG Screenshot
« Reply #1 on: July 13, 2012, 12:22:56 PM »
After a long night i found a solution.
You can use this script on all Devices to take JPG screenshots. (Windows, IOS, Android, ...)

1. Download and place this two scripts to you game directory in the Inspector view.
2. Place the "TakeScreenshot" script on a game object and create a FSM on the same game object.
3. Now use the "Set Property" action in the FSM to define the "File Name" and "File Path". (like on the picture)
4. With a Boolean (enableBool) value you can take screenshots.



Greetings

(Sorry my english)
« Last Edit: July 13, 2012, 03:22:22 PM by A3DStudio »

szomaza

  • Full Member
  • ***
  • Posts: 172
    • View Profile
Re: [SOLVED] Take JPG Screenshots
« Reply #2 on: February 16, 2015, 07:15:11 AM »
This stuff is pretty old.
Is anybody using this?
Does it work with current Unity and Playmaker versions?

Yes, i'll try it myself and post the results, but please share any insights you might have, using these.

Br,
szomaza

szomaza

  • Full Member
  • ***
  • Posts: 172
    • View Profile
Re: [SOLVED] Take JPG Screenshots
« Reply #3 on: February 23, 2015, 04:09:16 AM »
I tried this, it works nicely, saving screenshots under the project, into the specified folder structure when testing with Unity Remote with an Android device connected and on PC.

Could not get it to work when built to device. I changed the path to the sdcard and also to phone, tried using / and \ between the folder names, but could not get it to save any images onto device.
The app did pause for a moment when it should have taken the shots, so I guess it did, just could not write/save them for some reason.

Does the app have to have some rights set, so it can write to those image folders?

Well, anyway I don't think I'll be using this, just tested.

Br,
szomaza


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12405
  • Official Playmaker Support
    • View Profile
Re: [SOLVED] Take JPG Screenshots
« Reply #4 on: December 06, 2017, 12:27:52 AM »
Hi,

 there is a new action TakeCameraScreenShot now available on the Ecosystem.

 Bye,

 Jean