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"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

How to Add Components from a Blutility?

In an actor blueprint we have the option to "Add Static Mesh Component", however from a blutility script-- even with a reference to the selected actor obtained -- this option does not appear in the dropdown (even with "context sensitive" unchecked).

For more context, here's what we're trying to do: our designer has assembled some actors in the level editor by attaching StaticMeshActors to another actor that has a SkeletalMeshComponent as the root (which is much, much easier to do in the level editor than trying to add static mesh components in the blueprint preview pane). I'm trying to write a blutility to iterate through the attached StaticMeshActors, extract their transform/socket/mesh and replace them with StaticMeshComponents owned by the parent actor, deleting the child StaticMeshActors, so the whole assembly can be saved to blueprint.

Product Version: UE 4.17
more ▼

asked Nov 03 '17 at 12:33 AM in Blueprint Scripting

avatar image

31 1 4

avatar image peaches Nov 03 '17 at 12:53 AM

Note: the "Convert Selected Components to Blueprint Class" toolbar option is unsuitable since it doesn't respect the parent/child/socket relationships, and just splats everything into a jumble.

avatar image Spoondog Dec 23 '18 at 03:41 AM

I too would like to be able to add components via a blutility script. I've needed it in the past a couple of times but my current need is to be able to right-click on an actor and convert it to a certain actor while preserving components' attributes and doing some other operations along with it (i.e. spawn new actor, create the same primitives the source actor has, copy over some component attributes, delete old actor).

(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
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