Download

Unreal Engine CPP and BP Constructors a very private affair

Standard c++ environment allows you to do much in polymorphic class structure than Unreal engine allows, generally speaking am finding just because you initialised a base class member in constructor does not mean said variable is ready for use in derived class constructor.

Trying to figure out what order cpp constructors and theier derived BP class constructors are called by having each cpp/BP constructor in the chain appending thier name to a fstring , also proved to have limitations, cause the cpp created fstring , can not be used in derived BP class constructor.

So my question is, what are the guidelines/limitations of the concept of class constructor in the unreal engine environment, cause as far as i can see the only variables you can trust in cpp/bp class in early stage of engine start-up are private class variables.

If i initialise a string in c++ base class for a BP class, the very first place in the derived bp class i can expect to legitimately access the string is in the beginplay of derived bp class.

However , even though i cannot do anything with string setup in derived cpp class constructor.
The blueprint editor can show the value setup in cpp ctor if said string is a uproperty, meaning the editor can see the string ok, but the bp constructor cannot, by cannot i mean it cannot append to that string or use it in any way.

So i am adequately confused as to the limitations of inheritance when it comes to cpp / bp classes, especially in the area of start-up. Any enlightenment in this area much welcome regards use case and limitations.

Cheers