Hi,
I am trying to save a skeletal mesh reference inside a struct of skeletal mesh reference. A kind of inventory system.
So I a created character blueprint with a struct variable that contains a Skeletal Mesh Reference. During game, I edit the struct skeletal mesh reference thanks to the detail panel and I save that struct in a save game slot. I exit game, close UE4 editor and restart the editor. I then load that struct during game and fill my character struct variable with the loaded struct. UE4 editor in play in viewport seems to not be able to read the values saved and won’t filled the struct with the Assets References (that are actually visible if I open the savegame file in a text editor). All references are blanked.
The problem is that all this was working perfectly fine in UE4.8. Now that I have upgraded to UE4.13, unreal doesn’t seem to be able to read the struct from the save games slots correctly. Or not all the time because it works If I don’t close the editor. It saves and loads the references perfectly until I close the editor. A workaround I found but that’s not a viable option is that if I load the asset referenced in my struct with the level blueprint before loading the save game slot containing the struct, unreal seems to be able to read the values from that loaded struct. The problem is that I can’t load all the assets before maybe make a reference to it in my struct, it’s just not efficient in any way.
I spend hours to try to find a solution to this with my good friend google without success.
I also tried to change the variable type in my struct from a Skeletal mesh Reference to a Skeletal Mesh Asset ID. If I do so, UE4 crashes when I try to save my game slot containing the struct… I thought that would have worked though because it looks like a Skeletal Mesh Asset ID allows to reference an asset that is not loaded and the Skeletal Mesh Reference might not be able to do so but I might be wrong. Anyway, like I said, if I try to use a Skeletal Mesh Asset ID variable in my struct, UE4 crashes when I try to save my struct to a slot, so I don’t really know what to do anymore…
I also read stuff about TassetPTR Pointers and Asynchronous loadin but found nothing linked to blueprints and C++ scares me a lot because I don’t much about it…
So I hope I have been clear and that someone can please help me because it’s driving me crazy. Why does something as simple as that and that was working in 4.8 doesn’t work anymore in 4.13…
Basically I am just trying to assign a skeletal mesh reference in a struct during game for my character, save the struct in a savegame slot and reload that struct from the slot after I closed UE4 editor. Right now it only works if I load the referenced asset before loading the struct that references it which is not really a viable option, considering that I would like to be able to pick a skeletal mesh from a big bank of them and can’t load all of them before loading my struct from my savegame slot.
Soooo… Is anyone able to save a skeletal mesh reference inside a struct to a save game slot and then load that struct properly from that saved game slot ? If so can you please help me ? Or anyone has noticed this and it’s officially a bug ? Because even though I am not an expert, to me it sounds like it since it was working in 4.8…
Merci d’avance,
Vincent