# Get Assets by Class - how to find all BP assets of given class?

**URL:** <https://forums.unrealengine.com/t/get-assets-by-class-how-to-find-all-bp-assets-of-given-class/687899>\
**Category:** Blueprint\
**Tags:** Editor-Utility, unreal-engine, UE5-0, Blueprint, question\
**Created:** [November 10, 2022, 11:01am UTC](https://forums.unrealengine.com/t/get-assets-by-class-how-to-find-all-bp-assets-of-given-class/687899 "2022-11-10T11:01:57Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ilozen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ilozen](https://forums.unrealengine.com/u/ilozen)\
**Post date:** [November 10, 2022, 11:01am UTC](https://forums.unrealengine.com/t/get-assets-by-class-how-to-find-all-bp-assets-of-given-class/687899/1 "2022-11-10T11:01:57Z")

</div>

I’m working in blueprints with editor utilities and need names of all BPs of specific class. E.g. if I have a BP\_ArrowBase and inheriting from it: BP\_ArrowFIre, BP\_ArrowIce. I’d like to get the names of the latter two.

I tried using ‘Get Assets by Class’ with BP\_ArrowBase class but it returns nothing. Eventually I found that all blueprints report as being of Blueprint class. So I can get a list of all blueprints but then their class checking doesn’t work either:

 ![obraz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/9/f/59f3f5ed47463c99864412bdec6251ae3336b481.jpeg)

In this example, among others, it prints names of BP\_ArrowFire, BP\_ArrowIce but the check BP\_ArrowFire is Child of BP\_ArrowBase returns false.

How else can I get a list of BP names or classes that inherit from BP\_ArrowBase?

---

<div class="post-metadata">

**Author:** ![eldany.uy](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/eldany.uy/32/821920_2.png) [@eldany.uy](https://forums.unrealengine.com/u/eldany.uy)\
**Post date:** [November 10, 2022, 11:22am UTC](https://forums.unrealengine.com/t/get-assets-by-class-how-to-find-all-bp-assets-of-given-class/687899/2 "2022-11-10T11:22:30Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/d/e/fdeb7f8bc9ba9202bb648dcdd8611c7cbf0324f7.png)

---

<div class="post-metadata">

**Author:** ![Chatouille](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chatouille/32/1194622_2.png) [@Chatouille](https://forums.unrealengine.com/u/Chatouille)\
**Post date:** [November 10, 2022, 3:18pm UTC](https://forums.unrealengine.com/t/get-assets-by-class-how-to-find-all-bp-assets-of-given-class/687899/3 "2022-11-10T15:18:55Z")

</div>

Afaik this is not simple because assets/packages are not always loaded at all times, and asset registry does not know about blueprints hierarchical inheritance.

However, asset registry has ability to search by tags, and blueprints do store their parent class path and their closest native parent class path into tags.

Unfortunately searching by tags is not exposed to blueprints so you’ll need C++ utility to get anything done on that front.

Here is an example utility that searches blueprints children of a given _native_ parent class :

```cpp
#include "AssetRegistry/AssetRegistryModule.h"

bool USomeUtility::FindBlueprintsChildOf(TSubclassOf<UObject> InNativeClass, TArray<FAssetData>& FoundAssets)
{
	if (!InNativeClass || !InNativeClass->IsNative())
		return false;

	FAssetRegistryModule& AssetRegistryModule = FModuleManager::LoadModuleChecked<FAssetRegistryModule>("AssetRegistry");

	TMultiMap<FName, FString> TagsValues;

	// All native CDOs should be in memory - we can look up native subclasses of InNativeClass
	for (FThreadSafeObjectIterator It(InNativeClass); It; ++It)	
	{
		UClass* Class = It->GetClass();
		if (Class->IsNative() && Class->ClassDefaultObject == *It)
		{
			TagsValues.AddUnique(FBlueprintTags::NativeParentClassPath, FString::Printf(TEXT("%s'%s'"), *Class->GetClass()->GetName(), *Class->GetPathName()));
		}
	}

	return AssetRegistryModule.Get().GetAssetsByTagValues(TagsValues, FoundAssets);
}

```

I am adding all native subclasses of the provided class, so if you supply “Pawn” it will effectively also look for “Character” subclasses and “SpectatorPawn” subclasses etc.

You can theoretically achieve something similar with a blueprint base class, using the `FBlueprintTags::ParentClassPath` tag instead, however if you also need to fetch grandchildren you’ll probably have to implement some additional recursion.

---

<div class="post-metadata">

**Author:** ![VernamRD](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vernamrd/32/88719_2.png) [@VernamRD](https://forums.unrealengine.com/u/VernamRD)\
**Post date:** [March 8, 2023, 10:04am UTC](https://forums.unrealengine.com/t/get-assets-by-class-how-to-find-all-bp-assets-of-given-class/687899/4 "2023-03-08T10:04:34Z")

</div>

This option worked for me only after the replacement `FString::Printf(TEXT("%s'%s'"), *Class->GetClass()->GetName(), *Class->GetPathName())` on `FObjectPropertyBase::GetExportPath(Class)`

---

<div class="post-metadata">

**Author:** ![ilozen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ilozen](https://forums.unrealengine.com/u/ilozen)\
**Post date:** [March 8, 2023, 11:19am UTC](https://forums.unrealengine.com/t/get-assets-by-class-how-to-find-all-bp-assets-of-given-class/687899/5 "2023-03-08T11:19:54Z")

</div>

My friend found a solution:

- use node _GetDerivedClassNames_
- for _Name_ param connect _Make TopLevelAssetPath_ node:
  - for _Package Name_ param use folder path
  - for _Asset Name_ param use _BP name_ + “\_C” suffix, e.g. _MyBlueprint\_C_

---

<div class="post-metadata">

**Author:** ![dapostolBBI](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dapostolBBI](https://forums.unrealengine.com/u/dapostolBBI)\
**Post date:** [December 6, 2023, 3:40am UTC](https://forums.unrealengine.com/t/get-assets-by-class-how-to-find-all-bp-assets-of-given-class/687899/6 "2023-12-06T03:40:57Z")

</div>

Well, this is how I manage to get around the issue in Blueprints, not sure if there is a better way, but it worked for me.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/b/3/3b35bf1be119829cdf7b405a7efae08f5c016983.png)

---

<div class="post-metadata">

**Author:** ![Chatouille](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chatouille/32/1194622_2.png) [@Chatouille](https://forums.unrealengine.com/u/Chatouille)\
**Post date:** [December 6, 2023, 1:57pm UTC](https://forums.unrealengine.com/t/get-assets-by-class-how-to-find-all-bp-assets-of-given-class/687899/7 "2023-12-06T13:57:33Z")

</div>

Since UE5 there is a new node `GetBlueprintAssets` designed to do exactly that - find blueprint child classes of specified parent class (native or BP). It is also based on `GetDerivedClassNames` and does a recursive search using assets’ ParentClassPath tag.

---

<div class="post-metadata">

**Author:** ![icon\_GD](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/icon_gd/32/1209811_2.png) [@icon\_GD](https://forums.unrealengine.com/u/icon_GD)\
**Post date:** [December 15, 2023, 11:04am UTC](https://forums.unrealengine.com/t/get-assets-by-class-how-to-find-all-bp-assets-of-given-class/687899/8 "2023-12-15T11:04:29Z")

</div>

Based on @Chatouille and @VernamRD answer:

Here the version which only requires a UClass\* Base Class

```auto
	static FORCEINLINE_DEBUGGABLE bool GetBlueprintsFromBaseClass(UClass* InBaseClass,
	                                                         TArray<FAssetData>& FoundAssets)
	{
		if (!IsValid(InBaseClass))
		{
			return false;
		}
		
		FAssetRegistryModule& AssetRegistryModule = FModuleManager::LoadModuleChecked<FAssetRegistryModule>(
			"AssetRegistry");

		TMultiMap<FName, FString> TagsValues;

		// All native CDOs should be in memory - we can look up native subclasses of InNativeClass
		for (FThreadSafeObjectIterator It(InBaseClass); It; ++It)
		{
			const UClass* Class = It->GetClass();
			if (Class->IsNative() && Class->ClassDefaultObject == *It)
			{
				TagsValues.AddUnique(FBlueprintTags::NativeParentClassPath,
				                     FObjectPropertyBase::GetExportPath(Class));
			}
		}

		return AssetRegistryModule.Get().GetAssetsByTagValues(TagsValues, FoundAssets);
	}

```

Usage:

```auto
TArray<FAssetData> AssetData;
GetBlueprintsFromBaseClass(MyUInheritUObjectClass::StaticClass(), AssetData);

```

---

<div class="post-metadata">

**Author:** ![J\_Kalva](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@J\_Kalva](https://forums.unrealengine.com/u/J_Kalva)\
**Post date:** [August 2, 2024, 1:07pm UTC](https://forums.unrealengine.com/t/get-assets-by-class-how-to-find-all-bp-assets-of-given-class/687899/9 "2024-08-02T13:07:41Z")

</div>

This helped me sorting this logic out, which is exactly what I needed

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/6/28689b256caa13b13532551eacf793c7f5820afa.png)

---

<div class="post-metadata">

**Author:** ![ahedquist](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ahedquist](https://forums.unrealengine.com/u/ahedquist)\
**Post date:** [December 18, 2025, 5:09pm UTC](https://forums.unrealengine.com/t/get-assets-by-class-how-to-find-all-bp-assets-of-given-class/687899/10 "2025-12-18T17:09:00Z")

</div>

This is the correct answer, thank you!

 ![GetBlueprintAssets](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/c/4/3c40db23436da10d85a06a7259cef84939c970f1.png)
