CDO constructor failed to find blueprint, but adding "_C" crashes editor

The packaged game crashes on startup with an error:

Error: CDO Constructor (NoNameCharacter): Failed to find/Game/FirstPerson/Animations/FirstPerson_AnimBP.FirstPerson_AnimBP

That is, it cannot find the blueprint. I read that you need to add “_C” at the end of the reference of blueprint, but if I do this, the editor crashes. I do it in the class constructor

Line that causing crash:

ArmsMeshComp->SetAnimClass(ConstructorHelpers::FObjectFinder<UAnimBlueprint>(TEXT("/Game/FirstPerson/Animations/FirstPerson_AnimBP.FirstPerson_AnimBP_C")).Object->GeneratedClass);

I was in a hurry to write here, I fixed it myself: the error was in the type of object that I was trying to find: i was trying to reference “UAnimClass”, but I needed a “UClass”

1 Like