Create Root Component in C++ Constructor using Blueprint Variable

How to create a root component based on which mesh variable was set in BP e.g. I want to use the constructor to set a root but the BP variable doesn’t exist. Creating the components in postinit works but the components are not visible in the editor and it doesn’t set the root.

Is there any way to make the BP var available in constructor, otherwise how to set root and make components visible outside constructor?

    Aitem::Aitem() {
      if(var1) {
      } else if(var2) {

Did u ever figure this out?