playMaker

Author Topic: [Solved]Take Screenshot (no path)  (Read 2519 times)

stigma

  • Full Member
  • ***
  • Posts: 176
[Solved]Take Screenshot (no path)
« on: August 24, 2019, 04:19:26 PM »
I use Take Screenshot but I can not save the capture in the game folder.
I tried a lot of things but nothing helps. I want to be able to then use the screenshot in a material.
What is Persistyent Data Path for? There is no doc on this action.
Thank you
« Last Edit: August 27, 2019, 03:29:37 AM by stigma »

PlaymakerNOOB

  • Full Member
  • ***
  • Posts: 219
Re: Take Screenshot (no path)
« Reply #1 on: August 24, 2019, 10:13:17 PM »
persistant data is a folder structure that is the same across all PC and all MACs.   However, on Mobile devices its totally different.

Here is an action which determines the paths for you
https://hutonggames.com/playmakerforum/index.php?topic=11861.0


Here is some reading for Mobile devices:  https://hutonggames.com/playmakerforum/index.php?topic=20974.msg92067#msg92067

I just came across this, so it should be helpful to both of us.

The Android persistant data path should be this
/storage/emulated/0/android/data/com.mycompany.project/files/

Below are the paths, but its a bit older, so subject to change
----------------
Windows:
C:\Users\<userprofile>\AppData\LocalLow\<companyname>\<productname>


Windows Store:
%userprofile%\AppData\Local\Packages\<productname>\LocalState


Mac:
~/Library/Application Support/companyname/productname

older version of Unity on Mac:
~/Library/Caches folder

~/Library/Application Support/unity.companyname.productname.


Linux:
$XDG_CONFIG_HOME/unity3d/<companyname>/<productname>
which is the-same as
~/.config/unity3d/<companyname>/<productname>


Android:
/Data/Data/com.<companyname>.<productname>/files
with SD card on the Android device:
/storage/sdcard0/Android/data/com.<companyname>.<productname>/files
a fleshed out example would be
/storage/emulated/0/android/data/com.mycompany.project/files/

iOS:
/var/mobile/Containers/Data/Application/<RandomFolderName>/Documents

Example of the RandomFolderName full name:
/var/mobile/Containers/Data/Application/<055811B9-D125-41B1-A078-F898B06F8C58>/Documents
« Last Edit: September 01, 2019, 11:51:15 AM by PlaymakerNOOB »

stigma

  • Full Member
  • ***
  • Posts: 176
Re: Take Screenshot (no path)
« Reply #2 on: August 25, 2019, 03:16:28 AM »
I understand. But how to make Playmaker get the screenshot. Is there only Assets and Scene that is available?
it's not for a mobile but for a PC

PlaymakerNOOB

  • Full Member
  • ***
  • Posts: 219
Re: Take Screenshot (no path)
« Reply #3 on: August 25, 2019, 07:13:00 AM »
You might have a easier time with the updated action found on the ecosystem:  https://hutonggames.com/playmakerforum/index.php?topic=11308.msg84082#msg84082

stigma

  • Full Member
  • ***
  • Posts: 176
Re: Take Screenshot (no path)
« Reply #4 on: August 25, 2019, 09:03:34 AM »
it's ok but how to recover the image in unity?
« Last Edit: August 25, 2019, 09:10:49 AM by stigma »

PlaymakerNOOB

  • Full Member
  • ***
  • Posts: 219
Re: Take Screenshot (no path)
« Reply #5 on: August 25, 2019, 09:20:19 AM »
The ecosystem actions should save the screenshot as a texture or file.  If its a texture, you can reference this in your scene.  If its a file, you may be able to save it as a Playmaker Object variable, if so then you can reference that in your scenes too. 

stigma

  • Full Member
  • ***
  • Posts: 176
Re: Take Screenshot (no path)
« Reply #6 on: August 25, 2019, 12:47:15 PM »
I want to save it as texture but I can not do it.