Loading SaveData to long Playmaker

Discussion and help for Easy Save 3
Xsorks
Posts: 8
Joined: Tue Apr 07, 2020 5:30 am

Loading SaveData to long Playmaker

Post by Xsorks »

Hello everybody,

I've had a problem for some time.
I have a hide scene.
when I open this scene SaveData loads up to 1 minute and freezes unity. after 30 seconds or 1 minute the scene opens. But not all variables are always loaded. Sometimes everyone and sometimes not. What could that be?

I have about 120 variables in the scene.
20 times with MM-dd-yyyy HH: mm: ss date

15 bool

30 ints

30 floats

25 string


is it normal that it loads for so long?
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Loading SaveData to long Playmaker

Post by Joel »

Hi there,

The performance is likely because you're saving each piece of data to a different key. The more keys in a file, the longer it will take to find a particular key within that file.

In this case we provide the ES3File functionality, which allows you to cache data in memory which significantly improves performance when working with many keys.

I've created an example of doing this in PlayMaker for you here: https://moodkie.com/forum/viewtopic.php?f=17&t=1891

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Xsorks
Posts: 8
Joined: Tue Apr 07, 2020 5:30 am

Re: Loading SaveData to long Playmaker

Post by Xsorks »

Joel wrote:Hi there,

The performance is likely because you're saving each piece of data to a different key. The more keys in a file, the longer it will take to find a particular key within that file.

In this case we provide the ES3File functionality, which allows you to cache data in memory which significantly improves performance when working with many keys.

I've created an example of doing this in PlayMaker for you here: https://moodkie.com/forum/viewtopic.php?f=17&t=1891

All the best,
Joel

Thank you for your help.
another question.
should I save and load in each fsm or can I create a game object and save and load all variables from there and save and load?
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Loading SaveData to long Playmaker

Post by Joel »

Hi there,

Both are possible, so do you whichever you find easiest :)

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Xsorks
Posts: 8
Joined: Tue Apr 07, 2020 5:30 am

Re: Loading SaveData to long Playmaker

Post by Xsorks »

Hmm Sorry for new Question, i have a problem from your Example.

If i start game its saved perfectly if i start again then everything is erased.

Its problem from ES3 File create? Its created neu file if i start a game?
Its not loads saved dats, its override all ))
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Loading SaveData to long Playmaker

Post by Joel »

Hi there,

This is only intended as an example, so data is overwritten each time you load.

In an actual project you would load when the Fsm loads, and save when you quit or when the player presses a button.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Xsorks
Posts: 8
Joined: Tue Apr 07, 2020 5:30 am

Re: Loading SaveData to long Playmaker

Post by Xsorks »

Thank you very much, its work :)
And so can i save and load my 120 variables in one fsm? or i need 120 fsms?
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Loading SaveData to long Playmaker

Post by Joel »

Hi there,

You can save them all in one FSM, you just need to make multiple save calls in that FSM :)

Just a quick note: if you want to get a variable from another FSM, you can use PlayMaker's 'Get Fsm String/Int/Float/etc' actions (see this thread for more info: https://hutonggames.com/playmakerforum/ ... pic=4084.0)

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Xsorks
Posts: 8
Joined: Tue Apr 07, 2020 5:30 am

Re: Loading SaveData to long Playmaker

Post by Xsorks »

Hallo Joel,
sorry i have this problem again with es3 file
show this video
https://youtu.be/24XBGrNXmWU

what is my problem :(
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Loading SaveData to long Playmaker

Post by Joel »

Xsorks wrote:Hallo Joel,
sorry i have this problem again with es3 file
show this video
https://youtu.be/24XBGrNXmWU

what is my problem :(
Hi there,

I've not seen this before. It's not possible for me to understand what is happening from what you've sent me, but it looks like either an event is set up incorrectly, or there is a circular event in another FSM.

Please could you private message me a basic project which replicates this?

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