# Serialize Editor-made actors

**URL:** <https://forums.unrealengine.com/t/serialize-editor-made-actors/418237>\
**Category:** Blueprint\
**Tags:** property-customizati, unreal-engine, Blueprint, CPP, question\
**Created:** [February 24, 2018, 4:49pm UTC](https://forums.unrealengine.com/t/serialize-editor-made-actors/418237 "2018-02-24T16:49:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Inconceivable](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Inconceivable](https://forums.unrealengine.com/u/Inconceivable)\
**Post date:** [February 24, 2018, 4:49pm UTC](https://forums.unrealengine.com/t/serialize-editor-made-actors/418237/1 "2018-02-24T16:49:11Z")

</div>

I have created a C++ class “AEnemyBase”, inherited from ACharacter, which I use as the basis for enemies. I create a blueprint in the editor based on this class and pick the mesh and set some custom properties. Right now, I have a C++ class “EnemyManager” that spawns different enemies. I have to assign the enemies to it at the level start through an exposed property type, like this:

```
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Enemies")
TSubclassOf<class AEnemyBase> EnemyType1;

```

But this is quickly getting out of hand as I add more enemy types. What I’d really like to do is have a database of all the known enemy types that the EnemyManager can use. So my question is:

How can I serialize the ACharacters, created in the editor, such that the class can look them up without having to assign them at the level start?

---

<div class="post-metadata">

**Author:** ![Ali\_Akbar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ali_akbar/32/1008648_2.png) [@Ali\_Akbar](https://forums.unrealengine.com/u/Ali_Akbar)\
**Post date:** [February 25, 2018, 6:57am UTC](https://forums.unrealengine.com/t/serialize-editor-made-actors/418237/2 "2018-02-25T06:57:51Z")

</div>

You can automatically populate this at runtime in your EnemyManager class instead of manually assigning it

```
for (TObjectIterator<UClass> It; It; ++It) {
	UClass* Class = *It;
	if (Class->IsA(AEnemyBase::StaticClass())) {
		// Add Class to your list of enemies
	}
}
```
