Serialization would be the way to go if you absolutely NEED to store the entire actor. Yet, you cannot do this in BluePrint. Has to be done in C++.
Every Actor in the game world is stored in memory (RAM). References are pointers to the memory that’s holding the data. Think of pointers as addresses to specific boxes holding specific folders and files.
When you Save Game you’re storing specific memory data to a flat file. Data is literally being written to a file on your drive. When the game closes all the “memory” data is cleared. This means the pointers/references no longer exist.
When designing your game you need to think about subsystems and functionality that are going to be implemented down the road. The design stage, preferably scope stage, is where you tweak and plot based on future needs.
How do I simplify this actor for SaveGame functionality? What aspects can I isolate/modularize to make this heavy process easier and faster down the road. End of day I want to store the smallest amount of data possible.
Take for example the character. You do not need its movement velocity or any other movement related states. You just need a transform. Everything else movement wise should be defaulted, so when you spawn back in you’re simply standing at the last place you where and looking in the correct direction.
Character cosmetics, if any, should be a very simplified data format. Mainly ID’s (Name type) that can be used to look up data table entries for the heavy data.
e.g. Pants = Mblue_shorts / FPink_shorts, Shirt = MTango_top / FGrunge_topb etc
This could easily be packed in a small struct.
Character Inventory should be a Player State actor component. The SG version should be a pretty close mirror to the PS version except for Object References. They would require a new struct having an element entry for each specific obj reference.
Example of my inventory system and the SG struct I would create to store a copy.
My inventory is a named slot based setup. “Data Inventory” is a struct that uses named slots to hold quantity counts. Simple and fluid. All other inventory items are spawned and attached actors, thus Actor Obj References. If they are null the slot is empty.
Save Game Inventory is only holding absolute crucial information.