What exactly does the SlotName of DoesSaveGameExist mean?

hi guys,i’m recently fllowing a course of making a pinball game,and i get a question with the DoesSaveGameExist,the function has a parameter called SlotName,and from my understanding the function checks if there exists a SaveGame class named what SlotName tells,i dont know is that right?i’m confused with this now,guys please tell me your thoughts and understanding about this part,thx :slight_smile:

Usually you first create a SaveGame object and save it in Slot which should have a name.

Here is a using method:

oh,bro,thanks for your answering.i see what you mean,actually i got a problem with something like your CastToMySaveGame function,it always cast failed,so i doubt is there anything wrong with my DoesSaveGameExist,mine is like this:

and the output in the screen shows it does cast fail,is my usage wrong:(

Make sure you save the same class you cat to at this slot

i just checked my BP and i found there is no SaveGameToSlot is called,only CreateSveGameObject is existed…so is there any possibility that the DoesSaveGameExist return ture while SaveGameToSlot is never being called before(i’m a totally fresh man in unreal,and the questions may be very basic),still puzzled by thoes SaveGameToSlot/DoesSaveGameExist things…

Sure, your slot is empty. Once you create a SaveGame object you usually need to save it to the slot) After that you will be able to get saved object with all stored variable)

alright,i seems to find what my problem is,and thank you a lot for helping me understand how this function works,i really appreciate it :)thanks