Some question (playmaker)

Easy Save 2 has been replaced by Easy Save 3, so is no longer supported.
Locked
gozda
Posts: 45
Joined: Wed Jun 24, 2015 3:14 pm

Some question (playmaker)

Post by gozda »

Hi,

1.where is best place for save .txt file on android device?
2.when i use basic save place, where can i find it on device?
3.How can i delete single text file?
4.If there is possible for change file name?
5.If its any way for encrypt variable name?
6.If i have finished project, if is there possibility for change automaticly in all actions Encryption password? the same with Web username, web password...

Thanks.
User avatar
Joel
Moodkie Staff
Posts: 4848
Joined: Wed Nov 07, 2012 10:32 pm

Re: Some question (playmaker)

Post by Joel »

Hi there,

Saving to the default save location of Application.persistentDataPath (i.e. specifying just a filename) is the best place to save on Android as this is the only place guaranteed to be writable. This is usually located in /data/data/com.mycompany.myapp/files on Android.

To delete a single text file you can use the Delete action, and leave the tag field blank.

Our Rename action appears to be missing, but I'll ensure it's included in the next update. In the meantime I've attached the action below. Simply put it in your Playmaker/Actions folder and the Rename File action should appear in Playmaker.

The only way Playmaker would allow you to change the password/username/etc for all actions is if created a global variable for password/username/etc and and assigned these variables to the fields in the action. Then you would just need to change the value of the global variable to change the value in all actions.

All the best,
Joel
Attachments
RenameFile.cs
(1016 Bytes) Downloaded 596 times
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
gozda
Posts: 45
Joined: Wed Jun 24, 2015 3:14 pm

Re: Some question (playmaker)

Post by gozda »

Thanks,

Also how should work "delete From Web" action?

I tested and this action delete only es2Data variable, but file stay on web.
User avatar
Joel
Moodkie Staff
Posts: 4848
Joined: Wed Nov 07, 2012 10:32 pm

Re: Some question (playmaker)

Post by Joel »

Looks like the action wasn't handling deletion of files from web. I've modified the action and attached a UnityPackage below which you can use to update your action. This will of course be included in the next update too.

All the best,
Joel
Attachments
ES2PlaymakerUpdate.unitypackage
(7.9 KiB) Downloaded 575 times
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
gozda
Posts: 45
Joined: Wed Jun 24, 2015 3:14 pm

Re: Some question (playmaker)

Post by gozda »

Thank you again,

And when i upload file on web, i set Tag and File. In ef2File i got this file and on es2data i got this tag what i set, it is possible to set any data under this tag without replace file?
User avatar
Joel
Moodkie Staff
Posts: 4848
Joined: Wed Nov 07, 2012 10:32 pm

Re: Some question (playmaker)

Post by Joel »

No problem! If I understand your question correctly: if you write data to a tag, it will only overwrite that tag, not the entire file. So all other tags in the file will remain the same.

- Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
gozda
Posts: 45
Joined: Wed Jun 24, 2015 3:14 pm

Re: Some question (playmaker)

Post by gozda »

But i got action "Upload String" in this action i have to set: Value, Tag, Filename. When i try to upload, thats replace file with new file and there in file is only this new variable
User avatar
Joel
Moodkie Staff
Posts: 4848
Joined: Wed Nov 07, 2012 10:32 pm

Re: Some question (playmaker)

Post by Joel »

Would you be able to send me a screenshot of your action? We've not heard of this happening before, and this certainly isn't happening at my end.

Also just to check, is this what is happening for you?:
  • You upload a tag to a file and it saves to the server correctly.
  • You upload a second tag, with a different name to the first tag, to the file.
  • When you look at the file, the first tag you saved is deleted and only the new tag is in the file.
Also note that if you upload a tag to a file which already exists in the file, it will overwrite it. It's not possible to have multiple tags with the same name in a file.

- Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
gozda
Posts: 45
Joined: Wed Jun 24, 2015 3:14 pm

Re: Some question (playmaker)

Post by gozda »

I am not sure if you understand me.

This looks like this:
1.Using Upload File Action, i set Local file name "x.txt", Tag "x", filename "x.txt"(the same what i set in local file name).
2.Now i want set some data to this tag"x" what i set when uploading file. Use Upload String: set Tag "x", set value "y", Filename "x.txt".
And now i got replaced old x.txt file with new x.txt file but there is only "y"value
User avatar
Joel
Moodkie Staff
Posts: 4848
Joined: Wed Nov 07, 2012 10:32 pm

Re: Some question (playmaker)

Post by Joel »

Hi there,

Ah I understand now. Previously you said that you were using the Upload String action, but I think you meant to say that you were using the Upload File action.

The Upload File action will overwrite the entire file as it's intended for file syncing. If you wish to merge two files, you will need to upload each tag to the file individually.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Locked