Can a component create another child component?
In C++ I wrote a component which creates a Widget Component and attaches it to itself as a child. However, as it's in c++ I can't reference or modify the actual User Widget that I want to put on the component, so I decided to rewrite my component in Blueprint instead.
Problem is, it doesn't look like you can access a component's construction script in blueprint...? In C++, the child widget component would be created inside the constructor of my component.
Is there any way to access a component's construction script in blueprint? Or is there another way to have a component responsible for another child component attached to it?
asked Apr 07 '15 at 02:51 AM in Blueprint Scripting
Ended up doing it like this: Blueprint HealthComponent when initialized spawns Actor of type HealthBar and attaches it, and when uninitialized destroys it. HealthBar Actor has a WidgetComponent set to render my HealthBarWidget, which gets health data from HealthComponent.
answered Apr 10 '15 at 02:30 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here