REQUEST EXAMPLES AND TUTORIALS HERE

Examples using PlayMaker. Note that to view these examples, you will need to have purchased PlayMaker.
User avatar
Joel
Moodkie Staff
Posts: 5037
Joined: Wed Nov 07, 2012 10:32 pm

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Post by Joel »

Hi there,

This isn't possible with the PlayMaker actions. However, generally the way to resolve this would be to use filenames rather than absolute paths.

For example, instead of providing this as the file path field:
C:\Users\Someone\AppData\LocalLow\CompName\AppName\SpecificFolderName\capture.jpg
Simply provide this:
SpecificFolderName\capture.jpg
All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
PhilDark
Posts: 11
Joined: Sat Apr 03, 2021 5:10 pm

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Post by PhilDark »

Joel wrote: Wed Apr 07, 2021 7:09 am Simply provide this:
SpecificFolderName\capture.jpg
Works, thanks a lot !

2 suggestions :

1. A PM action "ES3 Cloud Save Image" would be great !

2. To improve the "Save Image" PM action, could it be possible to have 2 actions (or one single action with a bool)
- 1 action for png
- 1 action for jpg with ability to change compression quality
And for both actions, ability to resize to a % (same ratio) or to a fixed size (number of pixels).

Best regards
Phil
User avatar
Joel
Moodkie Staff
Posts: 5037
Joined: Wed Nov 07, 2012 10:32 pm

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Post by Joel »

Hi there,

ES3Cloud simply uploads files, so all you would need to do is use the Save Image action to save the image, and then the ES3Cloud action to upload it.
- 1 action for jpg with ability to change compression quality
Unity provides no way of adjusting the compression quality, so this would not be possible.
And for both actions, ability to resize to a % (same ratio) or to a fixed size (number of pixels).
Easy Save is only intended to save and load data. For this you would need an image manipulation asset.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
PhilDark
Posts: 11
Joined: Sat Apr 03, 2021 5:10 pm

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Post by PhilDark »

Thanks for your very clear answer, as always !
But this :
Joel wrote: Wed Apr 07, 2021 10:38 am Unity provides no way of adjusting the compression quality, so this would not be possible.
Is incredible, no ? I searched someting but didn't find any way, but I could not imagine that this is not possible in Unity... No asset can do this ? A workaround ? Any idea ?
Best regards
Phil
User avatar
Joel
Moodkie Staff
Posts: 5037
Joined: Wed Nov 07, 2012 10:32 pm

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Post by Joel »

Hi there,

I think I've managed to find a way to control the quality when saving JPEGs. If you private message me your invoice number I can send you a version of Easy Save which accepts a 'quality' parameter which you can use to specify a quality level between 1 and 100.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
ggstudios
Posts: 2
Joined: Tue Jun 15, 2021 12:06 am

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Post by ggstudios »

I am using ES3 with easy mobile pro along with playmaker to upload the save file to google drive. I am using the load raw string action to get the byte array. I am not sure how to get it back into a readable form to load from. I use save raw, but it does not seem to do what I need. In the post below you state es3 should have no issues loading from the byte array but I just get the same error." Cannot load from file because the data in it is not JSON data, or the data is encrypted" when using the load action. I am testing without using easy mobile pro just trying to read from the file after using load raw string so I know there is no issue with the other plugin. Is there any way to convert it back to a JSON file or am I missing a step somewhere.

https://moodkie.com/forum/viewtopic.php ... json#p7297

Edit:
I found this in the guides: Integrating with other storage APIs
A playmaker tutorial for using this method would be awesome. I am also not clear on how to use the load into action and if all the save actions should be set to cache for the local save or if that should be kept in a file.

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

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Post by Joel »

ggstudios wrote: Tue Jun 15, 2021 12:30 am I am using ES3 with easy mobile pro along with playmaker to upload the save file to google drive. I am using the load raw string action to get the byte array. I am not sure how to get it back into a readable form to load from. I use save raw, but it does not seem to do what I need. In the post below you state es3 should have no issues loading from the byte array but I just get the same error." Cannot load from file because the data in it is not JSON data, or the data is encrypted" when using the load action. I am testing without using easy mobile pro just trying to read from the file after using load raw string so I know there is no issue with the other plugin. Is there any way to convert it back to a JSON file or am I missing a step somewhere.

https://moodkie.com/forum/viewtopic.php ... json#p7297

Edit:
I found this in the guides: Integrating with other storage APIs
A playmaker tutorial for using this method would be awesome. I am also not clear on how to use the load into action and if all the save actions should be set to cache for the local save or if that should be kept in a file.

Thanks
Hi there,

If you're getting a "Cannot load from file because the data in it is not JSON data" error after using Save Raw to store the data locally, this means the byte array that has been downloaded is not the same as the byte array which was uploaded, and is no longer in JSON format. For example, it may have had a different encoding applied, or it may contain different data entirely.

Unfortunately I can't assist with external assets but I recommend looking at the save file after you've called Save Raw (you can view locally stored data by going to Tools > Easy Save 3 > Open Persistent Data Path).

If saving locally, you should keep the save location set to File.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
ggstudios
Posts: 2
Joined: Tue Jun 15, 2021 12:06 am

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Post by ggstudios »

Thanks for the quick reply,

I am not uploading or downloading the data, I am bypassing the other plugin and testing with ES3 only. Everything worked fine with load raw and save raw without base 64 encoding enabled. However it needs to be base 64 encoded in order to be uploaded. The issue comes when trying to decode the base 64 string using save raw. In the code it is clearly trying to convert from base 64.

Code: Select all

ES3.SaveRaw(System.Convert.FromBase64String(str.Value) + (appendNewline.Value ? "\n" : ""), GetSettings());
However all it writes to the file is "System.Byte[]". Please let me know if you are not getting similar results using those actions with base 64 encoding enabled.

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

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Post by Joel »

Hi there,

Thanks for the information, this I've managed to replicate. If you private message me your invoice number I'll send over an update to address this.

Alternatively, disable Base-64 encoding, as it's only required for very specific situations and may not apply to yours.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
flibble
Posts: 3
Joined: Sun Jul 04, 2021 1:34 pm

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Post by flibble »

Hi there,

I've had ES3 for ages and have only just had a need to use it as, probably stupidly, I've now finished my game before I thought about the whole Load/Save thing.
I've got variables etc. sorted easily and they save & load fine, my issue is with getting my head around GameObjects/Prefabs.

My game is simple, lots of animals prefabs get dropped in a single scene at certain points and are self contained (ie. they need no setting up just drop n' go) .
The other prefabs are decorations/foliage/trees the user can place at will to pretty the place up, these also need no setting up as they sort themselves out but can have many children/scripts on etc. There is about 200 prefabs which can be used at will so 3000+ in scene is more than likely.

All I need is an example of how to reference to each prefab and its location & rotation so upon Loading I would just spawn new ones straight from the prefabs, no need for saving exact instances or all the hierarchy of them, just (prefabTree0, location(x,y,z), rotation), I can't work out how to do this at all, and the documentation seems quite sparse & seems geared around saving specific instances of each GameObject, I've been staring at it blankly for days, lol :)

Sorry for being long winded!
Thanks
KevD
Post Reply