Save and load game Buttons BLUEPRINT for UI Widget

Hello! I made a save and load game blueprint inside my BP_Character where I only need to press a certain key to save and load the game and its working fine. What I wanna do now is to move the blueprint into the main menu widget so whenever i clicked the button (Save game) The game will automatically save the game the same with the load button. (Because I think this is more organize and proper way of saving and loading)

But the problem is I made it inside my BP Character so I had to use “Get Actor Transform” which is not needed in Wiget UI. What do I need to change??? I’m desperate this is the last part of my game before finishing it. Please help!



1 Like
  • to Get character transform:

  • to Set it, providing it is already spawned:

  • right click this node and Create Variable:

But you do not even need it, not here and not for this, at least.

  • Compile

How is it looking now?


Because I think this is more organize and proper way of saving and loading

On the contrary - generally speaking, the less you do inside widgets, the better. Alternatively, don’t copy the script to the widget, keep in the player and ask the widget to execute it.

Ideally, consider handling saving in the Game Mode, or even Game Instance.

1 Like

Thanks for answering my questions! I did all the three and the errors gone, but on the part where you said “the less you do inside widgets, the better” got me worried because that’s exactly what I’m tryna do.

If I am to keep the blueprint inside my character bp, how do I call it from widget to execute it? I’m very sorry because I’m very new to these, obligated to make a game because of our thesis. :confused: :pensive:

Also this my whole blueprint for saving and loading and its working perfectly fine.

1 Like

Think about what the widgets’ job is - it is to display stuff you tell it to and handle player input. UI should not handle game logic or something as critical as game saving. While it would be probably fine here since it’s a simple example, it’s not considered good practice.


  • create a Custom Event in the Player Character BP:

  • have the button’s onClicked tell the Player Character BP to execute it:

  • you can add variables to the Custom Event that describe the menu settings here in case you wish to save them, too
  • this can be made better providing the player has access to the widget

There’s a reason to designate the HUD class as a global UI Manager - its widgets become easily accessible from anywhere.

1 Like

Okay thanks, about the widgets I now agree and it all make sense. I just happened to be shock about how much nodes or variables & stuff needed to be inside the character blueprint, so to lessen it I moved some to the widgets lol.

I did the part where I should make a custom event and somehow as I tryna run the game, some unfamiliar error pops out.

It brought me on this part.

In order to access the save game object referenced by the variable the editor complains about, it must be either created first or loaded and referenced.

1 Like

You’re right! I connect it after the event begin play and it works! Thankss & I appreciate it a lot!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.