I’m trying to load a custom AnimInstance with ConstructorHelpers::FObjectFinder
I’m doing this in the constructor of my c++ class.
But the ConstructorHelpers::FObjectFinder doesn’t think so and throws an exception at the If check where it checks if it’s called from a constructor.
My code:
M4::M4()
{
ConstructorHelpers::FObjectFinder<UClass> weaponAnimInstance ((TEXT("%s"), *m_AnimInstancePath));
Animator = weaponAnimInstance.Object;
}
Can someone tell me why it’s throwing an exception despite being called from a constructor and how to solve this?