playMaker

Author Topic: Is it possible to Save Screenshot in a WebGL Build? [SOLVED]  (Read 7341 times)

mKeff

  • Playmaker Newbie
  • *
  • Posts: 4
Is it possible to Save Screenshot in a WebGL Build? [SOLVED]
« on: January 25, 2018, 08:46:24 AM »
I'm trying to save screenshots out of a WebGL build, so that the player can save a frame in-browser.  Is this possible?
« Last Edit: January 25, 2018, 10:38:53 AM by mKeff »

mKeff

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Is it possible to Save Screenshot / 3-frame Gif in a WebGL Build?
« Reply #1 on: January 25, 2018, 10:36:16 AM »
Hi - So I've come across a solution for this, and it's currently working for me using Unity 2017.1.1f1 - I've seen the question pop up a lot and gone unanswered on the web -

I used the method posted here: 

https://forum.unity.com/threads/how-to-screenshot-in-a-new-tab-of-the-browser-without-pop-up-blocking.440051/


However, I skipped the step where you make a button, and also skipped the "PressHandler" script that you attach to that button.. 

Instead, I used the "Invoke Method" action in playmaker.  this action could be triggered however you'd like using playmaker, in my case I chose to use "GetKeyDown" and used the "P" Key.

Hope this can help someone, thank you to Daniel and Valentin who put together the scripts

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Is it possible to Save Screenshot in a WebGL Build? [SOLVED]
« Reply #2 on: January 25, 2018, 04:05:47 PM »
Hi.
Thanks for posting your solution and thinking for others :D