So in the previous versions I was able to use the following to replace animation bps for my characters during run time based on an input string. But now in 4.5.1 I have to include the Animations\AnimBlurprint.h for the engine to find the object. But When this happens I get two errors. I’m not sure what changed or if there is more that i need to include to resolve this. Maybe there is a new module?
Code:
/***********************************************************************************************************
//Creates the Skelmesh and Animation BP from the reference links
/***********************************************************************************************************/
void AAI_Character::SetupSkelAndAnima()
{
USkeletalMesh* skelObject = LoadSkelMeshFromPath(*SHAPE);//load the object as per tutorial below or use static load object directly, or use ObjectFinder.
if (skelObject && Mesh)
{
Mesh->SetSkeletalMesh(skelObject);
}
UAnimBlueprint* AnimObject = LoadAnimBPFromPath(*ANIMATION);//load the object as per tutorial below or use static load object directly, or use ObjectFinder.
if (AnimObject && Mesh)
{
Mesh->SetAnimInstanceClass(AnimObject->GetAnimBlueprintGeneratedClass());
}/**/
}
Errors:
1> AI_NPC_Controller.cpp
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(56): error C2504: ‘UBlueprint’ : base class undefined
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(75): error C3668: ‘UAnimBlueprint::GetBlueprintClass’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(88): error C3668: ‘UAnimBlueprint::SupportedByDefaultBlueprintFactory’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(119): error C3668: ‘UAnimBlueprint::PostLoad’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(56): error C2504: ‘UBlueprint’ : base class undefined
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(75): error C3668: ‘UAnimBlueprint::GetBlueprintClass’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(88): error C3668: ‘UAnimBlueprint::SupportedByDefaultBlueprintFactory’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(119): error C3668: ‘UAnimBlueprint::PostLoad’ : method with override specifier ‘override’ did not override any base class methods
1> AI_Monster_Controller.cpp
1> AI_Monster.cpp
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(56): error C2504: ‘UBlueprint’ : base class undefined
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(75): error C3668: ‘UAnimBlueprint::GetBlueprintClass’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(88): error C3668: ‘UAnimBlueprint::SupportedByDefaultBlueprintFactory’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(119): error C3668: ‘UAnimBlueprint::PostLoad’ : method with override specifier ‘override’ did not override any base class methods
1> AI_NPC_Character.cpp
1> AI_PartyMemeber.cpp
1> RPG_Party.cpp
1> AI_Character.cpp
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(56): error C2504: ‘UBlueprint’ : base class undefined
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(75): error C3668: ‘UAnimBlueprint::GetBlueprintClass’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(88): error C3668: ‘UAnimBlueprint::SupportedByDefaultBlueprintFactory’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(119): error C3668: ‘UAnimBlueprint::PostLoad’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(56): error C2504: ‘UBlueprint’ : base class undefined
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(75): error C3668: ‘UAnimBlueprint::GetBlueprintClass’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(88): error C3668: ‘UAnimBlueprint::SupportedByDefaultBlueprintFactory’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(119): error C3668: ‘UAnimBlueprint::PostLoad’ : method with override specifier ‘override’ did not override any base class methods