Can i save actor's whole data?

save structs that contain enough information to spawn actors, instead of saving actors.

UE4ActorSaveLoad/PersistentStore.h at master · shinaka/UE4ActorSaveLoad · GitHub line 29:

TArray<uint8> ActorData;   // ActorData is an array of bytes

hello.

i’m trying my game save, but it’s too difficult.
i’m using saveObject. but i have to save all variables of actors. it’s so messy…
please help me!

i found code in github.

can this code save Actor’s CustomActorComponents and component’s data?
or have to save it with another solution?

this bot have many components.

and this is one weapon. (it has actor components too!)

93185-actorcomponent.png

and this is my one actor’s struct for saving (really messy)

p.s : what is “ActorData”? some type?

what is “ActorData”? one of UE4’s type?

no, its not from UE4, its a custom array variable, declared in PersistentStore, inside the github source code link you posted. its just an array of bytes, that is inside a struct, inside another struct.

ActorData is populated from the result of Actor->Serialize, which compresses the data of an actor into binary, as an array of bytes.

A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums,Read%26_Write_Any_Data_to_Compressed_Binary_Files

thx a lot! i need to study c++
have a nice day!