How can you destroy attached actors when parent is destroyed?
I'm creating a patrol path actor that has a bunch of target points attached to it to mark the path and I'd like to destroy those attached children when you destroyed the parent. I tried this, but the attach list is empty at this point.
asked Aug 03 '16 at 07:49 PM in C++ Programming
For the record, the reason your code is incorrect is that
This sounds like a good place to use
I think components might be an option though just looking over your current code I think the initial problem is you're trying to call destroy on the TArray multiple times instead of the contents of the array below I think is more accurate? Also should it be an "AActor" class not just "Actor" though i'd guess that should error if you typed it wrong?
I'm a bit of a newbie so i might just not understand a feature of C++\unreal if what you had should have worked...
Follow this question
Once you sign in you will be able to subscribe for any updates here