Does’nt work for me. CameraComponentType still contains its default value while in constructor.
It seems to me that we cannot access a property value edited in editor while still in constructor. And the problem is that CreateDefaultSubObject can only be executed in constructor. That’s the catch.
If any one knows a way to directly get the modified value of a property while still in constructor or a way to cleanly replace a component that was first created as a DefaultSubObject, I think it would work :p.
By the way, there was a missing “*” before CameraComponentType which in CreateDefaultSubObject which caused a crash to desktop. Took me a while to find out :
ObjectInitializer.CreateDefaultSubobject(CameraComponent, TEXT("Camera"), UCameraComponent::StaticClass(), *CameraComponentType, false, false, false);