I’m just trying to load the player information from my database string but when I use this it is not working:
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;
}
No matter if i use the direct string or the database string it crashes in the constructor. I’ve checked and this seems to work for everyone else. I am getting the string directly from the content browser.
I’m just trying to load the skeletal and animation bits dynamically. Is there any other way to achieve this using sting values?
USkeletalMesh* LoadedObject = //load the object as per tutorial below or use static load object directly, or use ObjectFinder.
**//The critical part**
if(LoadedObject && Mesh)
{
Mesh->SetSkeletalMesh(LoadedObject);
}
I’ll try this as soon as i get home. As for the other answer. That was one of the ones I tried above the only difference is that I have a system class that is storing the meshes to pass to other AI instances so the RPG_SYSTEM will always have a link to the main control mesh changed only via database. But that’s what failed.