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:

https://answers.unrealengine.com/questions/1039242/i-have-a-blueprint-that-duplicates-a-static-mesh-a.html

Thanks! I see it after change the setting.

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