[PLUGIN] Savior

Is it possible to save HierarchicalInstancedStaticMesh instances with savior?

Only the Editor can Serialize() meshes;
Packaged game would always crash.

So, no. I intentionally skip saving any kind of mesh information.

So what about large files, e.g. big arrays of vectors etc.?

No problem, the system can run its own thread and automatically generate progress (0-100%) report for you.

Is there any documentation on how to save struct data?

Structs save just like anything else;
Unless you have Object References in Arrays inside Structs; that kind of nested object references will not save.

Also you should make sure you’re not simply creating new Struct after loading, resetting everything to default values.

I tried to save a big struct with data but my pc just froze for like 5 minutes untill i did a reboot. Any idea why? Am on 4.20.3

If you launch your project from within Visual Studio and got a crash, debugger would tell you what happened, why there was a crash.

Ive got no crash, my pc just freezes. Perhaps my size is to big ? I expect the filesize aleast 100 mb (now i use RamaSaveSystem)

If you’re using the plugin on threaded mode nothing should freeze.
What might be freezing your PC is the built-in SaveSystem writing the *.sav file to your HDD, that file being so large.

And Rama’s Save System doesn’t freeze when saving ?

Nope, for the rama save system a file of 300 mb takes around 20 seconds to save… and is async to

Edit: just got a error with another test :

‘FMemoryWriter does not support data larger than 2GB.’

It seems the file is way more bigger than usual i had with Rama Save…

I use default SaveSystem to write files to disk, so I don’t really know what might be happening there in your case.

When i attemp to save i notice the progress is being stuck on around 60%. also i get a crash after a while. So its not even giving a progress… How can the file be bigger than Rama Save? is it compressed?

I don’t know anything about his system, never used.

Can you pm me a screenshot of the struct you’re saving, to let me see the types of its members that are saved from it?

Its just a struct holding arrays with mesh data. it must be within the filesize i think

Oh okay, now I understand the problem;
The plugin replaces instances of your struct while you have something reading “UVs”, “Tangents” and “Colors”. Random crash will happen because that…

I personally would instead split those two groups into separate structs, but then I don’t know how much that would affect your architecture.

But as mentioned above, the file is to big anyhow :wink: Its generating a file bigger than the max 2 GB

Yeah I would have to build a different mechanism to write the USaveGame object to disk from another thread, instead of using Unreal’s one;
I will keep it noted, but for now I cannot promise when/how/IF, etc…

Ive found a better way of creating my data with alot of less data costs. Thanks for the reply anyhow.

Got 2 more questions…

When i save a actor (like ADefaultPawn) and load back, the camera orientation seems not to be saved… How can i fix that?

Also, i cant manage to find out how to change the save file name… Any advises?

Thanks!