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"

How to make Material Slot accept "Materials" and "Material Instances"

Hi, I want to create a Blueprint containing a static mesh. When I place the blueprint on my map I want to be able to set the Material of the contained static Mesh, just as it would be possible when I had placed only a static mesh. I created a Variable of Type "Material" and made it editable by clicking the small eye. Everything works fine exept that I can now only apply "Materials" to the now Visible slot, but not "Material Instances". If I choose "Material Instance" as Variable type it is the other way around. Is there a way to enable both types, so it works like a normal static mesh material slot?

Thanks for your help! Cheers Michael

Product Version: UE 4.9
Tags:
more ▼

asked Nov 13 '15 at 12:53 AM in Blueprint Scripting

avatar image

Michael90
3 1 2 2

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

1 answer: sort voted first

Do this in the Construction Script of your BP;

alt text

Drag the Material pin of Set Material node and then Promote to Variable, which will be the new material. Enable Editable and that's it. If the mesh has multiple material ID's you need to do this for each of them of course.

more ▼

answered Nov 13 '15 at 01:43 AM

avatar image

Jacky
16.8k 671 167 677

avatar image Michael90 Nov 14 '15 at 03:37 PM

Thanks for your answer! That was exactly what I was looking for. Knowing that now, I could also do it manually by just setting the variable type to "Material Interface".

(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