REQUEST EXAMPLES AND TUTORIALS HERE

Examples using Easy Save's API code

REQUEST EXAMPLES AND TUTORIALS HERE

Postby Joel » Tue Apr 10, 2018 3:58 pm

Please post any suggestions for examples and tutorials in this thread.

Note that we can only create examples which only help individual people, and should be useful to most people.
Joel Tebbett @ Moodkie Interactive
Twitter - Unity - LinkedIn
User avatar
Joel
Moodkie Staff
 
Posts: 2477
Joined: Wed Nov 07, 2012 10:32 pm

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Postby MrLee » Sat Apr 14, 2018 7:17 am

Hey Joel.

I have a suggestion. I know its simple and most of people knows it. But I think most of the beginners feel difficulty to implement in the beginning so simple things must be considered.
My suggestion is in the section of supported type. Just write single line of each type to save and load.
Like as you support DateTime then write.

ES3.Save<DateTime>("Key", gameStopTime);
gameStopTime = ES3.Load<DateTime>("key", gameStopTime);

Plus is there any thread where I can give suggestion to add more fields to save. Like I think TimeSpan is not included yet to save in ES3. Where I can give suggestion for that ?
Thanx,
Regards,
Mr Lee.
MrLee
 
Posts: 4
Joined: Mon Apr 09, 2018 11:16 am

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Postby Joel » Sun Apr 15, 2018 10:12 am

Hi there,

Thanks for the suggestion, this is something we will definitely consider. Just to clarify for anyone coming across this, in Easy Save 3 the examples for each supported type are almost identical. i.e.

ES3.Save<YourType>("yourKey", yourData);
yourData = ES3.Load<YourType>("yourKey");


With regards to saving and loading TimeSpans, you can do this by converting it to and from an integer. i.e.

ES3.Save<long>("myTimespan", timespan.Ticks);
timespan = new TimeSpan( ES3.Load<long>("myTimespan") );


All the best,
Joel
Joel Tebbett @ Moodkie Interactive
Twitter - Unity - LinkedIn
User avatar
Joel
Moodkie Staff
 
Posts: 2477
Joined: Wed Nov 07, 2012 10:32 pm

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Postby Hodofca » Mon Apr 23, 2018 6:26 pm

It would be nice to have some example scenes or tutorials for ES3 like "ES3 file" and "ES3 cloud" features for playmaker users.
I'm trying to create an app for maintaining goods production. There will be 2 pages. One where "boss" will be setting new tasks for example:
- Desk (2 pcs, green, high, wooden etc.)
- Chair (3 pcs, red, low, metal etc.)

2nd app page will be "production" where worker will see his current tasks to do. (So tasks will be downloaded from MySQL and parsed, probably by string split).
I guess every task must have different record in MySQL. If all jobs would be in 1 single file there could be discrepancies if "boss" would add new task (so whole file would be updated) and in a second later "worker" would finish his single task so whole file would be resynced again by worker and new task from "boss" would be lost.

I don't know yet if i should use ES2 or ES3 as both throw me some errors (see topic on ES2 forum) or when i try to upload to the cloud then MYSQL database gives BLOB with info:
Code: Select all
<br />
<b>Notice</b>:  Only variables should be passed by reference in <b>E:\xampp\htdocs\ES3Cloud.php</b> on line <b>45</b><br />
<br />
<b>Notice</b>:  Only variables should be passed by reference in <b>E:\xampp\htdocs\ES3Cloud.php</b> on line <b>46</b><br />


So...
It would be nice to have some more examples for such a noob like myself, user of playmaker. Uploading and downloading data from MySql.
Image
Hodofca
 
Posts: 2
Joined: Mon Apr 23, 2018 10:34 am

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Postby Joel » Tue Apr 24, 2018 6:34 am

Hi there,

Thanks for the example request.

I've responded to your bug report regarding the Easy Save 2 error you were having, and it looks like you're using actions which were not created by us.

With regards to your Easy Save 3 error, this is fixed in the upcoming version. If you PM me your invoice number I'll send you the updated ES3Cloud.php.

All the best,
Joel
Joel Tebbett @ Moodkie Interactive
Twitter - Unity - LinkedIn
User avatar
Joel
Moodkie Staff
 
Posts: 2477
Joined: Wed Nov 07, 2012 10:32 pm

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Postby PabloAM » Sun Jun 17, 2018 10:43 am

Hello, I don´t know if there already is some tutorial to upgrade from Easy Save 2 to Easy Save 3 but could be awesome one.

Thanks!
PabloAM
 
Posts: 26
Joined: Tue Nov 18, 2014 8:43 pm

Re: REQUEST EXAMPLES AND TUTORIALS HERE

Postby Joel » Sun Jun 17, 2018 11:04 am

Thanks for the suggestion, we'll certainly consider this if there's demand for it. However, I generally suggest to stick with Easy Save 2 if your project already uses it, because Easy Save 2 save files are not compatible with Easy Save 3.

I can outline the major differences here though:

  • ES2.Save(myData, "myData") in Easy Save 3 would be ES3.Save<DataType>("myData", myData).
  • myData = ES2.Load<DataType>("myData") in Easy Save 3 would be myData = ES3.Load<DataType>("myData").
  • Instead of self-assigning load using ES2.Load<DataType>(myData, "myData"), we now provide a separate LoadInto method: ES3.LoadInto<DataType>("myData", myData)
  • Instead of specifying the filename like ES2.Save(myData, "myFile.txt?tag=myData"), there is now a separate filename parameter: ES3.Save<DataType>("myData", myData, "myFile.txt")
  • Instead of caching using ES2Writer/Reader, it is now achieved using the ES3File class.
  • If converting ES2Types to Easy Save 3, you should generate new ES3Types from the Window > Easy Save 3 > Types pane (see here).

All the best,
Joel
Joel Tebbett @ Moodkie Interactive
Twitter - Unity - LinkedIn
User avatar
Joel
Moodkie Staff
 
Posts: 2477
Joined: Wed Nov 07, 2012 10:32 pm


Return to Code Examples

Who is online

Users browsing this forum: No registered users and 1 guest