Save and load system(changing object,material or movement)in Blueprints

UE4 How to save and load using Widget buttons in Blueprints, like if you change any material of object or movement. Ex: You have multiple objects and in save1 you are adding object1 with different material and in save2 object1 with original material or object2. Then how to save and load them?

Could you clarify if you want to save and load within the same session or save to load in other sessions? In the first case, you can store data about the actors in variables. In the second case, you should use the Save Game object. Also, specify if the “objects” are Static Mesh Actors or other classes. Then I’ll describe the solution in more detail.

So, I want the data to be stored on different widget button slots, like you create a button to save one object and a different ui button to save the other position or object in realtime. The objects are static mesh actors. More like a archviz pattern, like saving a furniture with different material on one ui button and loading it from that button and other on a different button slot and loading it from that slot.

I’m not sure if I understood you correctly. Therefore, I will show how to make buttons for spawning a Static Mesh Actor with predefined parameters. I hope this helps.

  1. Make a template button widget with needed data variables.
    TemplateButton

  2. Make a controlling widget, place template buttons, and set data variables.

  3. Add events for spawning.

A slightly different approach is required if you want to change materials, static meshes, or the position of existing actors. However, I still don’t understand what exactly you want to do.

1 Like

So, I wanted to create a save and load system where I could save the changes that I make during runtime in a save slot and load it from the slot by using a widget. To be precise, like if I am adding a cube at a particular location, with a particular material and want to save that, then by clicking on a save widget button, I can save that as Save1 . Then, if suppose I am changing the location of the object or material, then I can do that and Save it as Save2, but the previous design I created will also be stored and visible in a scrollable widget, so that I can load that and edit it anytime I want.

For example: If I have a furniture and 4 different materials, I apply material 1 click on the Save button and the design gets saved as Save1 to a scrollable widget which is visible on right side of the game view scene, where I can later go and click on the saved design whenever I want to load and edit it. I apply material 2 change the location of the object, click on save then the design gets saved as Save2. I can load the saved objects whenever I want to.

Now everything is clear to me. I will try to show you how to implement it with an example of a level blueprint

  1. Create a loading button template
    LoadButton

  2. Create a controlling widget


  3. Create a save game blueprint where you will store the list of saved states

  4. Create a save game blueprint where you will store the states

  5. In the level blueprint, build a widget and subscribe to its events. Next, build the save-load logic.



image

My Products

1 Like

Thank you so muchhh

Could you tell me where did you get SavedList variable from in point 5(level bp)?

Thank you for your help!

Example Project Link
UE5 version

1 Like