so the problem is after loading when i print the class its return me invalid, i tried building the function inside the player but its not working, i tried with struct but its not working either they all give me the same result. Any help is appreciated, thanks before
PS: forgot to mention that the save game its the same as the one i use for saving player stats could be it the problem?
You can’t save object references. I mean, you can but, after loading, they will point at objects that may no longer exist… If you quit the game, they will definitely not exist. Those arrays do not contain actual objects - they’re just pointers to data in memory which will be released.
You can save those objects’ data once you pack them into structs - very similar to what you do with player stats atm. Once you load the data, recreated the objects.
i have already tried with structs but maybe my implementation was wrong, i created a BP struct and when saved the gave i setted the array item object pin of the struct to be the array of game object inside the component and when loaded i break the struct and set the value of the items array of the component to the value of the array item in the struct, this gave me the same result
You can only save basic variables - floats, strings, integers, booleans… Combine them inside structs add those to an array, add arrays to the Save Game object and save to disk.
If you do not want to deal with all this, look into saving plugins.
so you mean i cant save the arrays of object as i set it up?
you have some plugin u would suggest me?
how can i save it if i dont look for some plugin, i would really appreciate if you could guide me in the right direction, after it i could try do it myself
sorry if i ask so many question but how i can do it, i thought of spawning the object after loading by getting its class but if when i exit the game the array is empty its useless, so i think i need to do it before, but i have no idea how
i have already searched for some tuts but i seems to be doing the same as i was, thank for your patience