x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How i do i get the attached / children actors of an Actor?

Hello, i want to know in C++ what are the actors that are attached to another Actor (that has actors inside himself on the Scene outliner). How can i know this without iterating through all the actors and checking if it's attached to our Actor? Thank you

Product Version: Not Selected
Tags:
more ▼

asked Oct 23 '14 at 11:01 PM in C++ Programming

avatar image

xlar8or
6k 163 130 305

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi xlar8or

Its fairly simple actually, The AActor class has a public variable named 'Children'. Its a TArray of AActor pointers.

Simply doing this should suffice

 AActor* MyActor;
 TArray<AActor*> MyActor_Children = MyActor->Children;
more ▼

answered Oct 24 '14 at 02:07 AM

avatar image

Wilson89
31 3 2

avatar image xlar8or Oct 24 '14 at 11:11 AM

I think i typed for intellisense child or children and nothing came up. Thanks a lot :) One question related to why i needed this, if an actor is owned by another actor that is owned by a character, the first actor is still network relevant to the character right?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question