# Can i save actor's whole data?

**URL:** <https://forums.unrealengine.com/t/can-i-save-actors-whole-data/359515>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [June 3, 2016, 2:52pm UTC](https://forums.unrealengine.com/t/can-i-save-actors-whole-data/359515 "2016-06-03T14:52:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_1111614c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1111614c](https://forums.unrealengine.com/u/anonymous_user_1111614c)\
**Post date:** [June 3, 2016, 2:52pm UTC](https://forums.unrealengine.com/t/can-i-save-actors-whole-data/359515/1 "2016-06-03T14:52:33Z")

</div>

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.

> **[GitHub - shinaka/UE4ActorSaveLoad: An generic Actor Save/Load system that...](https://github.com/shinaka/UE4ActorSaveLoad)**
>
> An generic Actor Save/Load system that uses UE4's built in Actor Serialization - GitHub - shinaka/UE4ActorSaveLoad: An generic Actor Save/Load system that uses UE4's built in Actor Serializ...

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](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/6/7/267e1096ba8e6072e27a302d362f483c7fc92233.png)

​

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

 ![93186-savestruct.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/f/e/9fe459c1e76dfd24cf12c8ca7a4766ba32ee7924.png)

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

---

<div class="post-metadata">

**Author:** ![ScottSpadea](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/scottspadea/32/1194682_2.png) [@ScottSpadea](https://forums.unrealengine.com/u/ScottSpadea)\
**Post date:** [June 3, 2016, 3:05pm UTC](https://forums.unrealengine.com/t/can-i-save-actors-whole-data/359515/2 "2016-06-03T15:05:15Z")

</div>

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

[UE4ActorSaveLoad/PersistentStore.h at master · shinaka/UE4ActorSaveLoad · GitHub](https://github.com/shinaka/UE4ActorSaveLoad/blob/master/PersistentStore.h) line 29:

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1111614c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1111614c](https://forums.unrealengine.com/u/anonymous_user_1111614c)\
**Post date:** [June 3, 2016, 3:32pm UTC](https://forums.unrealengine.com/t/can-i-save-actors-whole-data/359515/3 "2016-06-03T15:32:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ScottSpadea](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/scottspadea/32/1194682_2.png) [@ScottSpadea](https://forums.unrealengine.com/u/ScottSpadea)\
**Post date:** [June 3, 2016, 3:50pm UTC](https://forums.unrealengine.com/t/can-i-save-actors-whole-data/359515/4 "2016-06-03T15:50:52Z")

</div>

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](https://wiki.unrealengine.com/Save_System),_Read_%26\_Write\_Any\_Data\_to\_Compressed\_Binary\_Files

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1111614c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1111614c](https://forums.unrealengine.com/u/anonymous_user_1111614c)\
**Post date:** [June 4, 2016, 4:08am UTC](https://forums.unrealengine.com/t/can-i-save-actors-whole-data/359515/5 "2016-06-04T04:08:21Z")

</div>

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