The virtual keyword has been removed from AGameMode::GetDefaultPawnClassForController
I used to have a custom implementation of this:
UClass* AGGameMode::GetDefaultPawnClassForController(AController* InController)
{
// see if the pawn class is set on the controller, if so use the class it wants for the pawn
IControllerInterface* c = Cast<IControllerInterface>(InController);
if (c && c->DefaultPawnClassForController)
{
return c->DefaultPawnClassForController;
}
return Super::GetDefaultPawnClassForController(InController);
}
I use this to allow the AI and player controllers to spawn the pawn which suites them. How can I work around this?
Oh ****, we have overriden both of those functions and they are absolutely necessary for our game. I hope they offer us decent alternatives. This will be the second time they’ve completely revamped AGameMode. I hope it all works out well, and not like they forgot to make stuff virtual like they did in 4.7, which will only be fixed in 4.8.
You should raise your concern on the 4.8 Preview dedicated page in order to get a feedback on Epic on how they planned to manage this. This may avoid missing stuff like Shammah said…
In order to allow Blueprints to implement functions like ChoosePlayerStart, GetDefaultPawnClassForController, and a great many more I had to make them BlueprintNativeEvents. Unfortunately that meant the C++ implementations of those functions are no longer named ChoosePlayerStart (for example), and instead the virtual you need to override is ChoosePlayerStart_Implementation. Otherwise it will work as before. This will be covered in the upgrade notes for 4.8 once the full release comes out, unfortunately we don’t have a preview version of the upgrade notes at this point.
As for DefaultTimer I chose to get rid of it as for games that don’t make use of it, it was just a wasteful timer ticking away for no reason. And for games that do make use of it, you can trivially redefine it in your own header and ideally give it a more appropriate name.