Add component to owned actor from actor component?

Hi,

I have an actor component A that is attached to TestActor, and in actor component A’s begin play event, I wish to create another component B and attach to TestActor. I tried the following steps in BP, it compiled but nothing happens, I can not locate where is B in the details of the TestActor after pressing play.

I think, you don’t see any of components in hierarchy of Actor added in runtime. Try add created widget to viewport to see it:

I think, you don’t see any of
components in hierarchy of Actor added
in runtime.

You can, they’re just hidden by default. Have look here:

Thanks! I see it after change the setting.

Thanks!
Seems runtime added widget needs to add to viewport manually.