C++: Easy way to save a structure.
Hi. I'd like to save an array of structures from my player controller to a save game class. I could easely save other types of variables, because you can just create a variable and then transfer it. But if I create the exact same structure in the save game class, I can't pass over the struct. So do I have to break the struct up and send every variable alone? Because my struct is pretty big and so I'd like to have an other option. Thanks!
asked Aug 27 '18 at 08:36 PM in C++ Programming
You don't need to declare 2nd identical structure, just forward reference (put struct before the type) the structure in save game class and UHT and UE4 reflection system will know which structure you use, you will only need to include deceleration in cpp file when you gonna copy the data so compiler will know which structure you use, but you need to do it anyway.
answered Aug 27 '18 at 10:12 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here