I’ve look through the fourms and the answer page but I can’t get the examples that they all explain to work.
enter code here
USkeletalMesh* ARPGParty::getPlayerMesh(int32 index){
long asd = index;
if (PartyMemberCount <= index){
////Con::warnf("WARNING::Party Index out of range: %d", index);
return nullptr;
}
//SkeletalMesh'/Game/RPGEngine/Actors/Characters/TheWarrior/TWar_Actor.TWar_Actor'
//mesh(*(PartyMembers[index].DataBlock));
static ConstructorHelpers::FObjectFinder<USkeletalMesh> mesh(TEXT("SkeletalMesh'/Game/RPGEngine/Actors/Characters/TheWarrior/TWar_Actor.TWar_Actor'"));// );
return mesh.Object;
}
This is what I am using to get the mesh via string saved in a database listing and create my party members on event play. But this fails every time. Even when I copy reference directly from the content browser the constructor fails.
All I want to do basically is to dynamically create the controller mesh and apply the animation when the level starts. But blueprint can’t create a mesh with a dynamic string so i tried this method and it fails on the creation of the mesh.
The break is on: > UE4Editor-RPGEngine_ProtoType-Win64-DebugGame.dll!ConstructorHelpers::FObjectFinder::FObjectFinder(const wchar_t * ObjectToFind) Line 67 C++