component class is not set for "ComponentName"....

For those who have the same problem with the “Actors components”: component class is not set for “ComponentName” - this component will not be instanced, and additional warnings or errors may occur when compiling blueprint ‘bp third person character’” I have just put a class UMyActorcomponent *ActorComponent;

image

image

I don’t know if this will solve your problem, but in my case it did.

I encountered this corruption today with the template BP_TopDownCharacter. I fixed it by duplicating BP_TopDownCharacter and using the duplicated one instead. It was really bizarre. My components from plugins just kept falling off of it after reloading The Editor.

1 Like

The problem surely lies with unreal, It’s either poor management by unreal or a bug.

This type of error likely occurs when a blueprint is loaded from C++ via FClassFinder, like this:

AMyThirdPersonGameMode::AMyThirdPersonGameMode()
{
	// set default pawn class to our Blueprinted character
	static ConstructorHelpers::FClassFinder<APawn> PlayerPawnBPClass(TEXT("/Game/ThirdPerson/Blueprints/BP_ThirdPersonCharacter"));
	if (PlayerPawnBPClass.Class != NULL)
	{
		DefaultPawnClass = PlayerPawnBPClass.Class;
	}
}

…or other ways a blueprint gets loaded very early in engine startup. In C++ put a breakpoint on the blueprint’s native class to find out why it’s being loaded.

When you use FClassFinder to load a blueprint, that means that the moment this code module is loaded that blueprint asset will also be loaded. For a class in the main project’s module that’s often the Default phase. If that blueprint depends on any plugins that are also loaded in the Default phase or later, it will be missing classes that it needs to load correctly.

You can either change the dependency plugin to PreDefault, or much better: don’t use FClassFinder to find BP classes in C++. Just create a derived BP to reference another class, or have a FSoftClassPtr in a DeveloperSettings that’s loaded later.