Add function to SaveLoadManager

MiTschMR 7 months ago in Game Creator updated by Marti (Lead Developer) 7 months ago 3

I would like to have an action to get all Save/Load profiles or a condition to check if a specific profile exists. It could also be done by code, this does not matter. 

Example: In my game prototype I decide with a check on a global variable at the beginning whether the player has already played the game. If true, then it should load all settings variables. This is currently not possible or I have not yet found a way to do it. 



Unity version:
Game Creator version:

Hi MiTschMR! Hope I spelled that right :-)

There's actually a way to do this, but it's undocumented, since it's not really used outside the scope of Game Creator. However, it makes sense in your case.

You can use the SaveLoadManager.Instance.GetProfileInfo(myProfileNumber); to get the information whether there's a game saved in myProfileNumber. If the value is null, means the profile hasn't been used.

This method returns a SavesData.Profile instance that contains the date in which the save was performed (in a string format).

Hope this helps!

That’s exactly what I am looking for. I’ve seen it when I analyzed the code later, but wasn’t sure how to use it. Thanks a lot for pointing me to it.