Playmaker Forum

Playmaker Updates & Downloads => Share New Actions => Topic started by: dudebxl on October 04, 2015, 01:36:21 PM

Title: take camera screenshot[SOLVED]
Post by: dudebxl on October 04, 2015, 01:36:21 PM
[EDIT] "Take camera screenshot" action is now available on the Ecosystem.

2 actions:


on ecosystem or https://snipt.net/dudebxl/takecamerascreenshot/

Req: Unity 5 (or Unity 4 pro)
Note: Will not capture the uGUI in screenshot. A bug within Unity itself preventing non-world-space UI items from being captured

any problems post here. thx
Title: Re: take camera screenshot
Post by: richardh on December 06, 2015, 05:05:37 PM
Downloaded this from the ecosystem tonight (Dec 2015) but get the following error:

Quote
Assets/PlayMaker Custom Actions/Application/TakeCameraScreenshot.cs(157,40): error CS0117: `System.IO.File' does not contain a definition for `WriteAllBytes'

I'm using unity 5.1.2
Title: Re: take camera screenshot
Post by: dudebxl on December 06, 2015, 06:58:51 PM
Which build are you in? Try pc or mobile build and see if it works.. I dont think action works in webplayer mode due to security reasons. Let me know...
Title: Re: take camera screenshot
Post by: richardh on December 07, 2015, 03:59:00 PM
Yes, I'm using it for a Webplayer (PC) build.
Title: Re: take camera screenshot
Post by: dudebxl on March 12, 2016, 08:47:41 PM
*** update - Default folder bug corrected (on both actions).
Title: Re: take camera screenshot
Post by: nilton_felicio on March 28, 2016, 11:47:34 AM
It is possible to know when the Take camera screenshot Texture ready?
That's quickly ?

I would like to follow up with another action only after the Take camera screenshot Texture was ready.
Maybe a progress bar .. While it was being prepared .


I would like to create the Take camera screenshot Texture particular area only. That is only a camera . Not the entire screen. It is possible?
Title: Re: take camera screenshot
Post by: dudebxl on March 28, 2016, 04:30:49 PM

just move to the next state when it is done (finish).. You can build your own progress bar using the states

These actions are only for camera and not screenshot. So place the camera however you want and take a picture from that camera.
Title: Re: take camera screenshot
Post by: unclebob on September 13, 2016, 04:41:37 AM
Hi

using 5.2 pro and windows 7 pro and this action TakeCameraScreenshot

Get this in editor when running scene

Assets/PlayMaker Custom Actions/Application/TakeCameraScreenshot.cs(139,90): error CS0103: The name `saveTexPath' does not exist in the current context

Three times in

(137,57)
(138,83)
(139,90)

Code: [Select]
if (useMypictures.Value == true)saveTexPath = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures)+"/";
else if (!useMypictures.Value && !useDefaultFolder.Value) saveTexPath = filePath.Value;
else if (!useMypictures.Value && useDefaultFolder.Value == true) saveTexPath = Application.persistentDataPath;

Suggestions please??

Cheers

Unclebob
Title: Re: take camera screenshot
Post by: dudebxl on September 13, 2016, 08:43:40 AM
OK, my bad, confused with another action. It has been corrected, please update action.
Title: Re: take camera screenshot
Post by: t4d on May 20, 2018, 02:23:07 AM
Note: Will not capture the uGUI in screenshot. A bug within Unity itself preventing non-world-space UI items from being captured

any way to Capture the GUI today ?  unity 2018 ?
Title: Re: take camera screenshot
Post by: jeanfabre on May 22, 2018, 11:12:05 PM
Hi,

 the bug seems to be still present...

 Bye,

 Jean
Title: Re: take camera screenshot
Post by: nFighter on August 23, 2018, 01:08:20 PM
Hello there! I have a quite weird issue.

I'm using FullBodyIK to change head rotation and aiming. But when I make a screenshot it render hair objects (separate obj attached to character skeleton) where they would be without implementing IK.

As I imagine it's something related to the scripts execution order, update/late update and maybe time for execution, but I don't know what to do, actually.

In my Script Execution Order: AimIK placed before PlayMakerFSM. I tried  to make a screenshot with time multiplayer 0, so it's not even relate on my fps, everything was paused at that moment.


(https://snag.gy/RvbGix.jpg)
Title: Re: take camera screenshot
Post by: nFighter on August 23, 2018, 01:15:54 PM
I also have a screenshot with exactly the same frame, but with Motion Blur turned on in a PostProcessing. As you can see it somehow blends and smear the hair objects from the proper position and without IK position. So it definitely make a screenshot a little bit faster then all the necessary scripts in frame are calculating.

(https://snag.gy/CQ1J9O.jpg)
Title: Re: take camera screenshot
Post by: jeanfabre on August 24, 2018, 12:27:55 AM
Hi,

ok, I have pushed on the Ecosystem a version of TakeScreenshot called TakeScreenShotLateUpdate that should do the job.

 also, check TakeCameraScreenshot and TakeCameraScreenshotTexture custom actions also on the ecosystem, they give you more possibilities ( only portion of the content since it comes from a camera you setup)

let me know how it works out

 Bye,

 Jean
Title: Re: take camera screenshot
Post by: nFighter on August 24, 2018, 07:56:54 AM
Yes! Perfect! Thanks a lot, it works  ;D ;D ;D
Title: Re: take camera screenshot
Post by: nFighter on August 24, 2018, 09:16:57 AM
Did you pay attention, that putting the action to LateUpdate fixed the UI issue? New action grab the UI perfectly  ;D ;D ;D

Hi,

 the bug seems to be still present...

 Bye,

 Jean
Title: Re: take camera screenshot[SOLVED]
Post by: jeanfabre on August 24, 2018, 10:16:10 AM
hi,

 no, I did not test it!! cool!!!

Bye,

 Jean