Hi i need some help with my Save System. How can i even save and load the Boolean Variable from any Instance Actor in the World? For example, I placed 1 actor several times in the World/Level.
The Thing is i want to save, that when i click on them then they are “bought” (Boolean). And i want to save that they where bought or not. How am i gonna do that?
I only figured it out how to save Integer, Float or even Transform Variables but… not Booleans for Objects in my World…
Could you please help me out with that? And maybe also helping me with some Screenshots? Thank you.
Hi Trixenne, I have some extra questions about your specific setup here, but my initial thought would be to use the actors GUID which is unique even on instance actors and generated when they’re dragged into a level, you can use this as a key and then save that with the bool or an int value 0 or 1 to state whether it’s been toggled.
I’ll need a bit more info on your setup and what you’r trying to accomplish to make sure I’m trying to help with the correct part of the issue you’re having.
Are you using blueprint save system or c++? And are you using the standard unreal save system where you extend off a SaveGameObject such as https://youtu.be/_4usRrTiqak
Am I on the right track where your issue is specifically the instance actors causing a problem because they handle the “this” pointer slightly differently to normal actors, or are you actually having an issue storing a bool variable but you can store ints and floats just fine? Any screenshots here would help so I can see what’s missing.
you need an ID per instance. use the actor GUID (unique even for placed duplicates) as the key in a map of GUID to bought bool on the savegame. on click set it and save, on BeginPlay each actor looks up its own GUID and applies it. bools work exactly like your ints and transforms once they are keyed like that. never store actor refs, they die with the session.
Advanced Save System, a save/load system plugin for Unreal Engine 5, handles the slots + serialization for that pattern in BP: Advanced Save System. on sale ($23.93).