You’ll need a variable in your actor header for both components. Probably want the “EditAnywhere” tag as well.
Also, when adding the root component, we always explicitly call:
"actor->SetRootComponent(newComponent);"
Any components you want editable in details panel will need a variable in the actor header with UPROPERTY(). You’ll want UPROPERTY on your components anyway because AFAIK they won’t save correctly, be eligible for garbage collection, hold static lighting, or other things without a UPROP.
The common actor “RootComponent” variable is the root component cast to a SceneComponent. But you still need a uproperty variable for whatever you add as the root component.