# 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:** 1\
**Showing post:** 8

<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);

```

---

_[View the full topic](https://forums.unrealengine.com/t/get-assets-by-class-how-to-find-all-bp-assets-of-given-class/687899)._
