Save Slot

Discussion and help for Easy Save 3, The Complete Save Game & Data Serializer System for the Unity Engine
Post Reply
Yazou
Posts: 8
Joined: Mon Jan 06, 2025 11:21 pm

Save Slot

Post by Yazou »

I have a lot of difficulty using it, is it something that works out of the box or do I need to add code on the different buttons? The doc doesn't say anything about the procedure to follow, is it possible to have an example scene? To explain where I am I have To add save slots to your scene, go to Assets > Easy Save 3 and select Add Save Slots to Scene or Add Load Slots to Scene. On Choose slot Button -> On Click()
public void Save()
{
ES3.Save("myPosition", this.transform.position, settings);
ES3.Save("myRotation", this.transform.rotation, settings);
}
Already here, is this correct?

i play scene , create slot and name it . Now we need to click On this new slot for save , correct ?
Is there a way for the newly created slot to save directly? It's not instinctive to have to click on it at that moment to get a save.

Now its weird, the save is not done instantaneously, sometimes it takes 30 seconds to create the save file, sometimes several minutes.
edit:(It seems that it is because of encryption, I removed it I don't have this latency problem anymore)

When I manage to get more save slot than I click on delete it works but not entirely there is always at least one slot that does not delete.



i have a probleme with load too for my tests i use :

Debug.Log("Position charger Player: " + ES3.Load("myPosition", ES3SlotManager.selectedSlotPath, Vector3.zero));
transform.position = ES3.Load("myPosition", ES3SlotManager.selectedSlotPath, Vector3.zero);
transform.rotation = ES3.Load("myRotation", ES3SlotManager.selectedSlotPath, Quaternion.identity);

and use load Scene After select slot of ES3 Slot Manager for Load the current scene

this code only work in Update, in start the debug.log show the good value after using load Scene After but the transform.position not work.
(if I change the scene there is no problem. The problem only appears if I load the scene I'm already in.)
User avatar
Joel
Moodkie Staff
Posts: 5081
Joined: Wed Nov 07, 2012 10:32 pm

Re: Save Slot

Post by Joel »

Hi there,
s it something that works out of the box or do I need to add code on the different buttons?
You just need to add the Save slots to your scene, and then ensure that you're not specifying your filename when calling Easy Save.
Already here, is this correct?
That is correct as long as your ES3Settings object is created after your user selects the save slot.
Is there a way for the newly created slot to save directly?
If you contact me on moodkie.com/contact I can send you a version to which I've added a Select Slot After Creation option for you.
Now its weird, the save is not done instantaneously, sometimes it takes 30 seconds to create the save file, sometimes several minutes.
edit:(It seems that it is because of encryption, I removed it I don't have this latency problem anymore)
Encryption is performance intensive. To improve performance you can follow the guide here:
https://docs.moodkie.com/easy-save-3/es ... ng-caching
Debug.Log("Position charger Player: " + ES3.Load("myPosition", ES3SlotManager.selectedSlotPath, Vector3.zero));
transform.position = ES3.Load("myPosition", ES3SlotManager.selectedSlotPath, Vector3.zero);
transform.rotation = ES3.Load("myRotation", ES3SlotManager.selectedSlotPath, Quaternion.identity);
You don't need to specify ES3SlotManager.selectedSlotPath here.
this code only work in Update, in start the debug.log show the good value after using load Scene After but the transform.position not work.
(if I change the scene there is no problem. The problem only appears if I load the scene I'm already in.)
If your issue works in one event (i.e. Update) and not another (i.e. Start) then it usually means that you code elsewhere in your script or project which is changing or initializing the position on Start, which is overwriting your loaded value.

If this isn't the issue, please could you replicate this in a new project with a simple scene and send it to me using the form at moodkie.com/repro. This should be a very simple scene which isolates the issue to Easy Save and contains no logic or content which isn't required to replicate the issue.
When I manage to get more save slot than I click on delete it works but not entirely there is always at least one slot that does not delete.
Please could you also create a scene in the above project which replicates this so I can see what is happening. Or provide me instructions here on how I can replicate it in a new project with a simple scene. You should also ensure that you're using the latest version of Easy Save.

All the best,
Joel

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Yazou
Posts: 8
Joined: Mon Jan 06, 2025 11:21 pm

Re: Save Slot

Post by Yazou »

I have tried again today and the problem for delete has disappeared.Maybe a magic of Unity.

For the problem of load position i tried with a built version and there has been an improvement, the position changes as expected 2 times out of 3.
edit: I had a script that parasitized the change of position (character controller has a move() function in update, I disabled this script at startup and reactivated it after a delay. Problem solved You were right.
User avatar
Joel
Moodkie Staff
Posts: 5081
Joined: Wed Nov 07, 2012 10:32 pm

Re: Save Slot

Post by Joel »

Glad you managed to resolve the issue. I've just emailed over the update which adds the Select Slot After Creation option :)

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Yazou
Posts: 8
Joined: Mon Jan 06, 2025 11:21 pm

Re: Save Slot

Post by Yazou »

Thank you Select Slot After Creation option is perfect. Should I keep the package you sent me preciously and forever or will it be integrated into a future update?

I found 2 strange little things.

When i save, the time that is displayed corresponds to the time of when the save took place, but when I close the canvas and reopen The time to go back 1 hour back.

currently I completely disable the Canvas Save Slot and I noticed that each time I reopen slots are added in ES3 Slot Manager (I attached an image about this). Note that I don't know if this is a problem or not and if it can impact the performance of the game.
Attachments
Capture d'écran 2025-02-10 182904.png
Capture d'écran 2025-02-10 182904.png (388.61 KiB) Viewed 8058 times
User avatar
Joel
Moodkie Staff
Posts: 5081
Joined: Wed Nov 07, 2012 10:32 pm

Re: Save Slot

Post by Joel »

Hi there,
Should I keep the package you sent me preciously and forever or will it be integrated into a future update?
It will be integrated into the next update.
When i save, the time that is displayed corresponds to the time of when the save took place, but when I close the canvas and reopen The time to go back 1 hour back.
That's very strange, I don't appear to be able to replicate this, but it sounds like C#'s DateTime.Now isn't returning the same time as the OS is using for to update the timestamp of the file. Please could you send me a basic project which replicates this on moodkie.com/repro so I can see if this is something we have control over.
currently I completely disable the Canvas Save Slot and I noticed that each time I reopen slots are added in ES3 Slot Manager (I attached an image about this). Note that I don't know if this is a problem or not and if it can impact the performance of the game.
I don't appear to be able to replicate this either. When OnEnable is called it explicitly deletes all existing save slots before creating new ones, so I'm not sure what is happening here. Please could you also replicate this in a simple scene (you can send it as part of the same project as I've requested above).

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