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. 

How to get a static mesh property from aclass?

I created a blueprint for a C++ actor class called Base. I need to get the blueprint class' static mesh property (that is declared on the Base class). Can anyone please help me with it? The Get Class Defaults function doesn't show static meshes (only strings, etc..)

Product Version: UE 4.11
more ▼

asked Apr 09 '16 at 08:22 PM in Blueprint Scripting

avatar image

3 1 4 8

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

2 answers: sort voted first

It is important what you created your class template is. When you create your class you should of used a Actor or pawn template. At the top left in the class there should be something that looks like a person click on this and in the details panel you will want to look for static mesh then add your static mesh from there.

more ▼

answered Apr 09 '16 at 11:30 PM

avatar image

143 7 6 7

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

Maybe this will help: alt text

In the image, we get the objects of a specific class, we then iterate through them getting the components of a specific class (in this case StaticMesh) we then iterate through those and print their display name.

Results for this test were:

LogBlueprintUserMessages: [GetMeshComponent_BP_56] ENV_Field_Tree_Med_A LogBlueprintUserMessages: [GetMeshComponent_BP_56] ENV_Field_Tree_Med_B LogBlueprintUserMessages: [GetMeshComponent_BP_56] ENV_Field_Tree_Med_B

Good luck!

more ▼

answered Apr 10 '16 at 12:11 AM

avatar image

186 9 3 11

(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