In A C++ project, how to prevent the creation of the defaults objects of game modes? (DefaultPawn, PlayerStartPIE ect)
i want control over what exactly enter my screen and when it spawns. and i dont need some of this things. my spawn controller create my own things and assign references to them.
I dont want to create a BP sub class for that please, i just want to use code (easier reusability in the future, less windows opened, BP are processing in the backgrounds all the time per frame in editor, once a lot of information introduced into the project BPs are nightmare ect ect )
Did it demanded to regenerate project files because its on the constructor ?
Can you please explain the meaning of this part of the statement?
ObjectInitializer.DoNotCreateDefaultSubobject(TEXT(“Sprite”))), im trying to understand if this is a call to something on the engine level of when it attempt to perform this routine or is it some generic call to initializer that exist in any AActor and can be used elsewhere in other situations
I just closed the project and recompiled the project from the IDE
I just copied the constructor from the parent class. Not exactly sure why the engine is skipping the sprite subobject as I never needed to override the game mode constructor in c++.
Usually the default “(const FObjectInitializer& ObjectInitializer)” is enough.