Passing data to base class at construction time


Unreal engine user code does not allow passing arguments to constructors.
For user objects/actors etc where i have full control i add an init function called after ctor.

But i have a new problem in same area, and its being able to do the same for my AGameModeBase
explained below

class  CommonGameModeBase : public  AGameModeBase
    CommonGameModeBase(TSomeClass* pSomeClass) 

class ProjectGameModeBase: public CommonGameModeBase 
      ProjectGameModeBase(TSomeClass* pSomeClass):CommonGameModeBase(pSomeClass)

Since this is not possible in unreal as far as i am aware all classes need to use FObjectInitlialiser.
Whats is the neatest best way to achieve this.

Am a bit new to the engine so currently reading up on potential options such as

  1. Data Table
  2. Data Asset
  3. FObjectInitlialiser:: possibly adding my argument to FObjectInitlialiser before passing it to base class ctor
  4. etc

Any help much appreciated

Only way is to have an Initialize function on your object, and call that. You can not do that via constructor.

You would need to adjust your class to handle that.

Thanks for the tip, you just gave me an idea by narrowing the options.
Ill have to hookup to one of those early events for my init