playMaker

Author Topic: Get Assets Folder Path  (Read 724 times)

issara

  • Playmaker Newbie
  • *
  • Posts: 2
Get Assets Folder Path
« on: January 19, 2021, 12:14:05 PM »
 I found one only "Get persistent Data Path" in Ecosystem but my project need save some screenshot and save file under "Assets folder" in game build
 If someone can make
thank you very much

nuFF3

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 74
  • Are we even real?
    • One Month Studio
Re: Get Assets Folder Path
« Reply #1 on: January 21, 2021, 11:01:13 AM »
The action "Take Screenshot" already has that function.
Set it to Custom Path and write "Assets" (without the "") in the Custom Path field.
And it should save a screenshot in the main Assets directory.
You can use forward slashes to denote folders if you have created any.
As an example: Assets/Screenshots/

If you need to create a folder in realtime, the action "Create Directory" on the Ecosystem will cover that.
In the "Create Directory" action you must have string variable for it to work. You can simply write the values in the string variable within the Variables tab, or by using a "Set String Value" action before the "Create Directory" and setting the value to whatever directory you want made.
Again, as an example: Assets/Screenshots/
You'll find the newly made directory within the assets folder.

This is for the editor itself however, for a build project the "assets" folder is a folder named "[Project-name-here]_Data", so you should target that unless you want a new folder made next to the game exe.

Although in testing, I can't get the "Take Screenshot" action to work currently. If you also have issues with it, find the "Take Camera Screenshot" action from the Ecosystem and use that one instead.
« Last Edit: January 21, 2021, 11:09:35 AM by nuFF3 »