Announcement

Collapse
No announcement yet.

Get current value of a dynamic material instance

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Get current value of a dynamic material instance

    Hi, I got stuck with this.

    I'm trying to increment the value of a dynamic material instance, it works fine the first time I launch the blueprint but then the "Get Scalar Parameter Value" doesn't update so it doesn't keep incrementing the value when the blueprint is launched again.
    Attached Files
    Last edited by Cxrrxj; 02-14-2020, 08:21 PM.

    #2
    Originally posted by Cxrrxj View Post
    Hi, I got stuck with this.

    I'm trying to increment the value of a dynamic material instance, it works fine the first time I launch the blueprint but then the "Get Scalar Parameter Value" doesn't update so it doesn't keep incrementing the value when the blueprint is launched again.
    It looks like you're doing that find, but what's on the left of that map? Is this in a loop, in the construction script, somewhere else?...

    Comment


      #3
      Hi, I just simplified the blueprint so there is nothing else on it. Still, it is not working, when I hit O the first time it increases the radius, the following times it doesn't do anything. The print string reveals that the value doesn't change.
      Attached Files

      Comment


        #4
        ClockworkOcean Any clue about how to fix it?

        Comment


          #5
          I thought that the scalar or vector parameters on MID were not retrievable. I bet if you read the description of that node's description it will tell you as much.

          Your best solution is a material parameter collection.

          Comment


            #6
            Originally posted by Cxrrxj View Post
            ClockworkOcean Any clue about how to fix it?
            That's because you're creating the material again. So, it goes back to it's default state.

            You need to create the material, and leave it. *Then* do the O thing:

            Click image for larger version

Name:	dynmat.PNG
Views:	28
Size:	91.3 KB
ID:	1721646

            Comment


              #7
              ClockworkOcean Many, many thanks. That was it.

              Comment

              Working...
              X