So, they’re problems with all approaches I’ve come accross.
I could create a pure C++ *ACharacter *and reference the class by DefaultPawn = AMyCharacterClass::StaticClass(), however, now I cannot tweak the characters variables outside of code …
I could also create a pure BP-Class and reference it like this: static ConstructorHelpers::FClassFinder<ACharacter> MyBluerintClass(TEXT("\Game\MyBlueprintClass")), and then assigning it’s class value to the default pawn: DefaultPawn = MyBlueprintClass.Class. Works wonders, except for one reason, I now have the character logic in a blueprint class (which you can have, but I’m a programmer, not using BP for anything else than light gameplay scripting), also, I have to hard reference it with a string, so it’ll break if I move the Blueprint asset.
Last option as far as I know is to create a *ACharacter *class to hold all the logic, and create a BP inherited from my *AMyCustomCharacter *class and use that BP-Class as my DefaultPawn, now I have all the logic in my C++ class, however, it still requiers a hard reference using a string, which honestly makes me want to lightly pinch myself in the arm.
TLDR: In your experience, what’s the best way to assign a DefaultPawn to a C++ GameMode to counter these issues:
- Tweakable variables
- No hard string references