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"

changing materials in runtime

I made a two materials(instances) and write a blueprint script. But it doesn't change like i made. It changed like the default grey color material. alt text

Product Version: UE 4.21
Tags:
캡처.png (143.9 kB)
more ▼

asked Feb 08 '19 at 04:20 AM in Blueprint Scripting

avatar image

bokyeongisme
1 1

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

1 answer: sort voted first

Hi !

In order to change material at runtime, you have to create something called Dynamic Material Instance (DMI). Right click on your BP background, and search "Create Dynamic" it should pop up. Once you have done this, you set the material ith the node you have used, in the begin play of your actor, to that DMI.

And from this DMI, you have nodes called Set Scalar/Vector parameter values, wich will allow you to change the material parameters at runtime :)

Have a look at this if some things are unclear : https://blueprintue.com/blueprint/iltew027/

more ▼

answered Feb 08 '19 at 08:49 AM

avatar image

ZelodaN
3 2 1 3

avatar image bokyeongisme Feb 19 '19 at 04:32 AM

but I don't want to change the parameter values, i just want to change to the other material I made with the jpeg file. Can you tell me how to do this..?

(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