I have no idea why all my attempts to override a BlueprintNativeEvent are not doing well.
Basically, after inheriting AGameModeBase class and overriding the method
UFUNCTION(BlueprintNativeEvent, Category=Game)
AActor* ChoosePlayerStart(AController* Player);
by doing this:
virtual AActor* ChoosePlayerStart_Implementation(AController* Player) override;
I’ve got this crash log:
Crash Log
UE4Editor_CoreUObject!UFunction::Invoke() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:4542]
UE4Editor_CoreUObject!UObject::ProcessEvent() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1314]
UE4Editor_Engine!AActor::ProcessEvent() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\actor.cpp:693]
UE4Editor_Engine!AGameModeBase::ChoosePlayerStart()
UE4Editor_Engine!AGameModeBase::execChoosePlayerStart() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\engine\classes\gameframework\gamemodebase.h:47]
UE4Editor_CoreUObject!UFunction::Invoke() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:4542]
UE4Editor_CoreUObject!UObject::ProcessEvent() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1314]
UE4Editor_Engine!AActor::ProcessEvent() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\actor.cpp:693]
UE4Editor_Engine!AGameModeBase::ChoosePlayerStart()
UE4Editor_Engine!AGameModeBase::execChoosePlayerStart() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\engine\classes\gameframework\gamemodebase.h:47]
Accusing Stack overflow - code c00000fd (first/second chance not available)
I’m not sure what’s wrong, I’m using the same indentation as GameMode overriding GameModeBase method and my method just a Super call.
UFunction::Invoke() is causing loop.
void UFunction::Invoke(UObject* Obj, FFrame& Stack, RESULT_DECL)
{
checkSlow(Func);
UClass* OuterClass = GetOuterUClass();
if (OuterClass->IsChildOf(UInterface::StaticClass()))
{
Obj = (UObject*)Obj->GetInterfaceAddress(OuterClass);
}
TGuardValue<UFunction*> NativeFuncGuard(Stack.CurrentNativeFunction, this);
return (Obj->*Func)(Stack, RESULT_PARAM);
}