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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Get all components from Actor Class

I need a way to get all components (specifically static mesh components) from an actor class, I would rather not spawn it just to get the components and then delete it again so I was wondering if there is some equivalent to Get Class Defaults but for components, again, specifically static mesh components.

What I'm trying to do is show what an actor will look like to the player before actually spawning it, so I need to get all the visual elements from that actor without having the blueprints fire so I thought only getting the static mesh components would be the best idea. If there is a better way of achieving this goal then please let me know.

Product Version: UE 4.18
Tags:
more ▼

asked Oct 29 '17 at 05:55 PM in Blueprint Scripting

avatar image

Sezze
3 1 3 5

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

1 answer: sort voted first

not sure if you can get default components for an actor by using blueprints, but why not to spawn a temporary actor? Do I understand that you do not want to spawn it due to begin play? You can always have a boolean variable exposed to spawn that will break begin play execution if needed.

If you put some screenshots that will help to get better understanding and may be better ideas.

more ▼

answered Oct 30 '17 at 12:47 AM

avatar image

Flash7
839 9 17 29

avatar image Sezze Oct 30 '17 at 06:14 PM

It was because of begin play, but I did not know about exposing variables to the spawn node. It is definitely a good workaround and this seems like something I should have learnt a long time ago. Thank you I'll mark this as the answer!

(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