Hi there guys!
Sorry for the really noob question, but I want to declare the class with the default Pawn in the GameMode
directly in C++ (since in my project it wouldn’t change).
And I challanged myself to create the whole project without a single blueprint (execpt of the really really simple stuff, like doors or moving platforms).
So as fat as I understood, There is a UPROPERTY in the AGameMode.h class that should get the default pawn class (DefaultPawnClass), and it’s type is APawn.
So my question is, how do I get the path for the class? (Without fstream.h of course :p).
I saw that it might be achived by using the ConstructorHelpers::FObjectFinder
Here is the code I’v tried (the syntax is probably incorrect):
I think the preferred method is to set it to a BlueprintClass that is of your custom class type, so that you can then easily edit it within the editor rather than having to always edit code to change settings. For example this is done in the FirstPerson template:
Thanks for the reply, but as I’v said, I’d really like to create the core foundations of the game without any blueprints… Also, Most of my code was inspired by the TPS Template, and I’v got the idae of the DefaultPawnClass from it