# Get All character BP in specific folder

**URL:** <https://forums.unrealengine.com/t/get-all-character-bp-in-specific-folder/105402>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [January 23, 2018, 8:45am UTC](https://forums.unrealengine.com/t/get-all-character-bp-in-specific-folder/105402 "2018-01-23T08:45:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hydrojan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hydrojan](https://forums.unrealengine.com/u/hydrojan)\
**Post date:** [January 23, 2018, 8:45am UTC](https://forums.unrealengine.com/t/get-all-character-bp-in-specific-folder/105402/1 "2018-01-23T08:45:41Z")

</div>

Hello, I tried make an array from my chars folder with use ObjectLibrary feature.

```auto

void FMyGameEditorModule::GetCharactersInFolder(const FString& Path, TArray<FString>& Paths, TArray<FString>& Names)
{
    auto ObjectLibrary = UObjectLibrary::CreateLibrary(ACharacter::StaticClass(), false, true);
    ObjectLibrary->LoadAssetDataFromPath(TEXT("/Game/char"));

    TArray<FAssetData> AssetDatas;
    ObjectLibrary->GetAssetDataList(AssetDatas);
    UE_LOG(LogTemp, Warning, TEXT("Found assets: %d"), AssetDatas.Num());

    for (const auto& AssetData : AssetDatas)
    {
        Paths.Add(AssetData.ObjectPath.ToString());
        Names.Add(AssetData.AssetName.ToString());
    }
}

```

```auto

const FString& Path = "/Game/chars";
TArray<FString> Paths;
TArray<FString> Names;

```

This code returns 0 every time. I created a character class with cpp in my folder and also created Character BP but nothing return. Could someone give any idea?

---

<div class="post-metadata">

**Author:** ![kamrann](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kamrann](https://forums.unrealengine.com/u/kamrann)\
**Post date:** [January 23, 2018, 9:06am UTC](https://forums.unrealengine.com/t/get-all-character-bp-in-specific-folder/105402/2 "2018-01-23T09:06:41Z")

</div>

Try passing true as the second argument to CreateLibrary if you want it to load Blueprints.

Also, note that object library is kind of outdated, you should be using the new asset manager stuff for this kind of thing.

---

<div class="post-metadata">

**Author:** ![hydrojan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hydrojan](https://forums.unrealengine.com/u/hydrojan)\
**Post date:** [January 23, 2018, 10:18am UTC](https://forums.unrealengine.com/t/get-all-character-bp-in-specific-folder/105402/3 "2018-01-23T10:18:49Z")

</div>

I changed second argument as true. But it still gives me 0 .

Edit: When I changed ACharacter::StaticClass() as UBlueprint::StaticClass() I got result like 7(My total BP. But I should get only Character BPs)
