Noted noted! Also as I continue progressing into Unreal, I have more and more questions. Currently, I am wrangling with the GameMode
Class.
It doesn’t fit anywhere into my singleplayer game for a few reasons:
1.) My game is singleplayer, so its much less helpful for my project. But that is not really a reason for removing it.
2.) I instance all my PlayerController
and PlayerCharacter
on my own! So I don’t need the GameMode
class arbitrarily doing that for me.
3.) MAIN REASONS:
- I have been constantly fighting it because I cannot remove it from the project all together (you’re forced to have one).
- I tried to override the functions of
GameModeBase
and make the initialization functions do nothing, but then other parts of the engine will begin throwing errors (I can provide images of these errors if you would like). - And worst of all, I would not be opposed to keeping it, if it didn’t force me to create a default pawn, and default controller no matter what (in fact, it always instantiates them at runtime). This is a big problem because the pawn that is used changes depending on what the player selects, so will I have to make a
GenericPawn
that is always loaded in on engine start, then swap out thePlayerControllerClass
, andDefaultPawnClass
later in logic? At that point, why does it not allow me to just leave theGameMode
out? Am I missing something critical about its implementation?
I have decided that currently it may be best just to let it use a default GameMode
, then on the first frame, cull the default PlayerControllerClass
and DefaultPawnClass
by re-initializing them to nullptr
s. No matter what I do, the GameMode
wants to instantiate its own PlayerController
and PlayerCharacter
, and they just sit there doing nothing for all of runtime.
P.S.: Sorry in advance for the constant barrage of questions! It’s just nice getting to ask someone who knows their stuff, top to bottom, the things I have been thinking about!