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. 

Mobile Starter Content Material not found

Hello! I've got a problem with using materials from MobileStarterContent. I used this C++ code to load Material:

 BlockMesh->SetMaterial(0, ConstructorStatics.WoodMat.Get());

But after I build this project in Visual Studio, I get message that /MobileStarterContent/Materials/M_Wood_Pine.M_Wood_Pine asset was not found. What I am doing wrong? Thanks in advance!

Product Version: UE 4.7
more ▼

asked May 31 '15 at 11:02 AM in C++ Programming

avatar image

3 1 2 3

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

1 answer: sort voted first

Hello, drakosvlad

To get the correct asset reference, please right-click on the asset in Content Browser and click "Copy Reference". Thus, you'll be able to paste it to the appropriate place in your code and load the asset:

 static ConstructorHelpers::FObjectFinder<UMaterial> Material(TEXT("Material'/Game/MobileStarterContent/Materials/M_Wood_Pine.M_Wood_Pine'"));
  VisibleMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("VisibleMesh"));
  if (Material.Succeeded()) 
             VisibleMesh->SetMaterial(0, Material.Object);

Hope this helped!

Good luck!

more ▼

answered Jun 11 '15 at 04:23 PM

avatar image

Andrii Melnyk
1.8k 60 19 112

avatar image drakosvlad Jun 20 '15 at 04:48 PM

Problem was in using UMaterialInstance class instead of UMaterial. Thanks for code example :)

(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