[4.9] How to override GameMode::InitNewPlayer?

Until now I was able to override this function. But since 4.9 it won’t work anymore. It says that the function is hidden:

Warning	6	warning C4264: 'FString AGameMode::InitNewPlayer(APlayerController *,const TSharedPtr<const FUniqueNetId,0> &,const FString &,const FString &)' : no override available for virtual member function from base 'AGameMode'; function is hidden	C:\Users\brain\Documents\Unreal Projects\StruggleOfMages\Source\StruggleOfMages\SomGameMode.h	61	1	StruggleOfMages

I need to receive the joined PlayerController aswell as the Player’s Parameters/Options with which he joins. Is there another way of doing that?

Hey -

This function can still be overridden however the cause for the compile error is that the parameter list has changed slightly. The FUniqueNetId now needs to be declared as const in the TSharedPtr parameter.

Cheers

That’s it! Thanks !