playMaker

Author Topic: How do I change material properties in PlayMaker?  (Read 5529 times)

alexsecl

  • Playmaker Newbie
  • *
  • Posts: 8
How do I change material properties in PlayMaker?
« on: March 03, 2024, 05:45:21 PM »
Hey, everybody,
My English is not very good, so I couldn't use the forum search properly to find the answer to my question.

Is it possible to change material properties through PlayMaker? For example floating value metallic or smoothness?

stigma

  • Full Member
  • ***
  • Posts: 210
Re: How do I change material properties in PlayMaker?
« Reply #1 on: March 04, 2024, 12:27:33 PM »
with Set Property Action.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: How do I change material properties in PlayMaker?
« Reply #2 on: March 05, 2024, 08:12:50 AM »
Use Set Material (property block) Float.  (Set Material Property Block Float. you can find on the Ecosystem)

Set Material Float will change the value on the material itself.
Set Material Property Block Float will change the value on the 'instance' material (aka on that object only)

The float name will probably be "_Metallic" but you can find the proper names by opening the shaders

Avoid using Get/Set Property Actions

alexsecl

  • Playmaker Newbie
  • *
  • Posts: 8
Re: How do I change material properties in PlayMaker?
« Reply #3 on: March 07, 2024, 10:24:18 AM »
Use Set Material (property block) Float.  (Set Material Property Block Float. you can find on the Ecosystem)

Set Material Float will change the value on the material itself.
Set Material Property Block Float will change the value on the 'instance' material (aka on that object only)

The float name will probably be "_Metallic" but you can find the proper names by opening the shaders

Avoid using Get/Set Property Actions

Thanks, I did it. 8)

ombamiusa

  • Playmaker Newbie
  • *
  • Posts: 1
    • Slither io
Re: How do I change material properties in PlayMaker?
« Reply #4 on: March 14, 2025, 10:24:11 PM »
These properties are managed by the material's Shader. You need to know the exact property name in the Shader to change them.

lauralordelaure

  • Playmaker Newbie
  • *
  • Posts: 1
    • Mapquest Directions
Re: How do I change material properties in PlayMaker?
« Reply #5 on: April 07, 2025, 10:41:14 PM »
Use the Set Property Action (if supported)
Select the GameObject with the Renderer component (like a mesh or sprite).
Use the Get Component action to get the Renderer component.
Then use the Set Property action:
Target the material property of the Renderer.
Choose Set Property again to go deeper and set material.FloatProperty, like _Metallic or _Glossiness (which controls smoothness).
You’ll need to know the exact name of the shader property. For most standard Unity shaders:
Metallic = _Metallic
Smoothness (sometimes called glossiness) = _Glossiness