Hi
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
- Data Table
- Data Asset
- FObjectInitlialiser:: possibly adding my argument to FObjectInitlialiser before passing it to base class ctor
- etc
Any help much appreciated