How to tell from C++ if a Blueprint is making use of the Blueprint Constructor Event


We are experiencing problems with a set of blueprints that create dynamic Components in the constructor. I have already implemented an editor utility that takes a set of actors placed in a level, “extracts” the dynamic content created and creates new Actors with that content.

It works great, but the number of blueprints are quite large and I don´t want to replace the ones that are not making use of the constructor.

Is there a way that I can check if the constructor function of a blueprint is implemented in C++?


You can have bool that you set to true when using construction script from blueprints?

Thanks for your answer. But the idea is to not know it in advance. Imagine that I have hundreds of Blueprints that I haven’t made.

I did this:
inside an editor class:

for (TActorIterator<AActor> It(World, AActor::StaticClass()); It; ++It)
  if (MyLib::HasConstructorComponents(*It))
  //do stuff

bool MyLib::HasConstructorComponents(AActor* Actor)
	for (UActorComponent* Comp : Actor->GetComponents())
		if (Comp->CreationMethod == EComponentCreationMethod::UserConstructionScript)
			return true;
	return false;