# Editor plugin edit Asset Components

**URL:** <https://forums.unrealengine.com/t/editor-plugin-edit-asset-components/426671>\
**Category:** C++\
**Tags:** unreal-engine, editing, editor, UE4, CPP, question\
**Created:** [June 4, 2018, 9:36pm UTC](https://forums.unrealengine.com/t/editor-plugin-edit-asset-components/426671 "2018-06-04T21:36:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![norsfell\_simon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@norsfell\_simon](https://forums.unrealengine.com/u/norsfell_simon)\
**Post date:** [June 4, 2018, 9:36pm UTC](https://forums.unrealengine.com/t/editor-plugin-edit-asset-components/426671/1 "2018-06-04T21:36:11Z")

</div>

Hello,

I m trying to write a tool to help our artists mass edit some Blueprint Assets in the editor. I have created a very basic plugin (Editor Standalone Window) and I figured out how to get a list of all my asset in a specific folder, but I m stuck when it gets to editing components in those assets.

Here is my code so far :

```
FAssetRegistryModule& AssetRegistryModule = FModuleManager::LoadModuleChecked<FAssetRegistryModule>("AssetRegistry");
	TArray<FAssetData> AssetData;
	FARFilter Filter;
	Filter.ClassNames.Add(UBlueprint::StaticClass()->GetFName());
	Filter.bRecursivePaths = true;
	Filter.bRecursiveClasses = true;
	Filter.PackagePaths.Add(FName(*SubPath));
	bool isSuccess = AssetRegistryModule.Get().GetAssets(Filter, AssetData);
	UE_LOG(LogTemp, Display, TEXT("Search success : %s"), (isSuccess ? TEXT("True") : TEXT("False")));
	for (FAssetData asset : AssetData)
	{ 
		UBlueprint* assetBP = Cast<UBlueprint>(asset.GetAsset());
		if (assetBP->GeneratedClass->IsChildOf(AActor::StaticClass()))
		{
			TSubclassOf<AActor> actorClass = *assetBP->GeneratedClass;
			if (actorClass != nullptr)
			{
				AActor* actor = actorClass->GetDefaultObject<AActor>();
				if (actor != nullptr)
				{
					UE_LOG(LogTemp, Display, TEXT("actor OK %s"), *actor->GetFullName());
					TArray<UActorComponent *> children = actor->GetComponentsByClass(UActorComponent::StaticClass());
					UE_LOG(LogTemp, Display, TEXT("Children %i"), children.Num());
				}

			}
		}
	}

```

This give me a proper list of assets but actor-\>GetComponentsByClass always gives me an empty array, I also tried to get actor-\>RootComponent but it is always null.

The assets I m trying to load are Actors with a bunch of USceneComponent in it and some UStaticMeshComponent attached to those. My ultimate goal is to edit some values in the rendering of those static mesh.

(Sorry if I m unclear English is not my native language).
