I have specific need to initialize a script object but postpone calling constructor before I do some additional work. I want to do this because constructor may call some methods and use variables that may not be yet initialized, because they're set from outside the script. What will be set depends on some meta info etc. so I basically want to do some work and then call the usual constructor.
I found that CreateUninitializedScriptObject does exactly what I need and looks like it works well, but I don't know how should I then call the constructor so it only executes what's in constructor's body and not create a new object? The factory function I retrieved would create new object when called right? Also how does that work with inheritance? If I'm using CreateUninitializedScriptObject on a Foo object and inheritance hierarchy is Foo < Bar < Baz, how can I make sure all constructors are called? Is it even possible when creating uninitialized object? In Serializable addon it's only used to restore object and it says there that calling constructor may have some side-effects, but it does not explicitly say it would create second object instance.
So is it possible to call and how it behaves then? And if so - how do I retrieve the type for calling it, as I assume it would be different than factory func?