CDO construction error (noob question)

Hi!

Probably a noob question, but I couldn’t find the answer myself. :confused:

When I am building my “Development Client” or “Development Server” targets which gives distinct .exe files, and then try to run either, I get the following error:

Error: CDO Constructor (MyPlayer): Failed to find AnimBlueprint’/Game/Characters/Mannequins/Animations/ABP_Manny’

The error stems from these two lines of code:

static ConstructorHelpers::FObjectFinder<UAnimBlueprint> BP_Anim(TEXT("AnimBlueprint'/Game/Characters/Mannequins/Animations/ABP_Manny'"));
	if (BP_Anim.Succeeded()) GetMesh()->SetAnimInstanceClass(BP_Anim.Object->GetAnimBlueprintGeneratedClass());

I don’t get this error in the editor however.

Can someone tell me how to specify what files to include in the builds for the “Development Client” and “Development Server” targets?

I usually don’t use hard references but shouldnt the path to the asset be doubled pointing to the uasset?

static ConstructorHelpers::FObjectFinder BP_Anim(TEXT(“AnimBlueprint’/Game/Characters/Mannequins/Animations/ABP_Manny.ABP_Manny’”));

Seems you talking about building the project from visual studio (or any other ide). But “building sources” is only a part of the proccess for receiving runnable game, as the building of code does nothing with assets.

Hence, i guess the thing you looking for is an Package project feature for editor’s file menu. This feature will automatically run building for required target and will pack all assets you need

I’m pretty sure it works with or without the doubled pointing. I’m only encountering this issue now as I’m trying to make a multiplayer game with dedicated server.

EDIT: Now I tried it out as well, rebuilt and recooked everything, it still doesn’t work.

I had the same problem where it would work in editor but not in a packaged game, I fixed it by doing it like this

static ConstructorHelpers::FObjectFinder<UClass> BP_Anim(TEXT("Class'/Game/Characters/Mannequins/Animations/ABP_Manny.ABP_Manny_C'"));
	if (BP_Anim.Succeeded()) GetMesh()->SetAnimInstanceClass(BP_Anim.Object);

Interesting, I wonder if this is the way to do it for all Blueprint classes? o.o

And thanks for the answer, this definitely works as of 5.0.3. :slight_smile: