# Some assets are not registered? (AssetRegistry)(C++)

**URL:** <https://forums.unrealengine.com/t/some-assets-are-not-registered-assetregistry-c/2403827>\
**Category:** Getting Started & Setup\
**Tags:** unreal-engine, CPP, question\
**Created:** [March 20, 2025, 10:19pm UTC](https://forums.unrealengine.com/t/some-assets-are-not-registered-assetregistry-c/2403827 "2025-03-20T22:19:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [March 20, 2025, 10:19pm UTC](https://forums.unrealengine.com/t/some-assets-are-not-registered-assetregistry-c/2403827/1 "2025-03-20T22:19:31Z")

</div>

I’m trying to get an array of assets by class type.  
The thing is that I don’t get all the files that exist of the required class.

For example: I tried to get the USoundCue files  
`GetAssets<USoundCue>((TArray<USoundCue*>&)SoundBase);`

But only one appeared on the list.

 ![0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/3/6/e36b9545ab4c9fdeaf3795e0680800812f98e8eb.png)

I know I have another SoundCue that is not listed.  
In fact the missing Sound Cue is compiled immediately after printing the list (This is done by the engine, not me).

 ![1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/5/8/d58ebd4b59323100b6314f26aa14a5d43d0ef991.png)

This is the missing Sound Cue.

 ![SC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/d/8/fd8181e24826bebbea2057e82e98eac48e1d331c.png)

This is my code:

```auto
	template<class T>
	void GetAssets(TArray<T*> &OutAsset)
	{
		FAssetRegistryModule& AssetRegistryModule = FModuleManager::LoadModuleChecked<FAssetRegistryModule>("AssetRegistry");
		TArray<FAssetData> AssetData;
		const UClass* Class = T::StaticClass();
		if (!IsValid(Class)) return;
		
		
		const FName InPackageName = *Class->GetPackage()->GetName();
		const FName InAssetName = Class->GetFName();
		AssetRegistryModule.Get().GetAssetsByClass(FTopLevelAssetPath(InPackageName, InAssetName), AssetData);

	
		for (FAssetData& Item : AssetData)
		{
			T *AssetPtr = Cast<T>(Item.GetAsset());
			if (!IsValid(AssetPtr)) continue;

			OutAsset.Add(AssetPtr);
		}
	}

```

* * *

The question is more than obvious.  
Why some files not appear in the registry?  
What can i do to make the missing files appear in the registry?

Thank you so much!!
