UChildActorComponent problem in Construction Script
Hello! I'm trying to add a child actor component in my actor's contruction script. I could easily do this in blueprints but simply cannot get the same exact behaviour in C++. I want the child actor to be attached to the parent object, and be cleared every time the construction script is run (like it does in BP's).
Currently, every time the construction script is run it creates a new Room in the root hierarchy of the World Outliner (although it appears attached to the actor since I can't select them individually). Previously in blueprints, the room would appear nested under the parent actor in the World Outliner and the child actor components are recreated, instead of remaining in the world as a new one is created.
Basically, previously in blueprints when the construction script was executed;
The C++ version with my current code;
Do I need to manually delete all the child components in C++? This is my current code, any help would be greatly appreciated!
asked Oct 25 '18 at 11:29 PM in C++ Programming
If you use the line:
It should behave like in blueprints.
answered Oct 26 '18 at 08:44 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here