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"

New objects spawned in C++ during play added to the derived blueprints too?


I've used NewObject() to spawn a new component during gameplay but nothing is showing up when the function is executed. The code compiles without complaint.

Are my suspicions that new components spawned in a C++ class during gameplay will not appear on its blueprint children? Am I better off executing a UFunction and handling the last bit of the spawning in blueprint on the child?


Product Version: UE 4.18
more ▼

asked Jan 14 '18 at 12:21 AM in C++ Programming

avatar image

5 2 3 5

avatar image MC1RScorpion Jan 14 '18 at 01:40 PM

The plot thickens.

I've now tried instead creating a UFunction that then executes an Add X Component node during play but while this also compiles and plays just fine there is no sign of any components being added to the actor.

Am I missing something obvious?

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

1 answer: sort voted first

He ythere, did you call the register component after you've created it?

more ▼

answered Jan 14 '18 at 01:13 PM

avatar image

6k 161 129 304

avatar image MC1RScorpion Jan 14 '18 at 01:38 PM

Hi @xlar8or,

I did indeed call RegisterComponent(). I've also tried RegisterComponentWithWorld() but to no avail.

avatar image xlar8or Jan 14 '18 at 01:40 PM

Can you show me your code and what shows/or doesnt show in the blueprint children.

avatar image MC1RScorpion Jan 14 '18 at 01:44 PM

Hey, thanks a lot.

The relevant code is over in this question HERE.

(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