playMaker

Author Topic: Change Material (Shared) [SOLVED]  (Read 462 times)

MarkD

  • Junior Playmaker
  • **
  • Posts: 97
    • View Profile
Change Material (Shared) [SOLVED]
« on: July 13, 2019, 11:01:20 AM »
Hey there,

I'd like to change a material that is shared by multiple objects.  The context is that I would like to fade out a large number of objects at the same time, but I don't want to have to have an individual script on each object.  So I'd like to lower the alpha on a shared material and have all of the objects that share that material fade out.

Using Set Material with a prefab throws warnings about attempting to change a shared object and all of my searches of the Ecosystem hasn't turned up anything.

Does anyone know how to do this or knows how to write an action that can?

« Last Edit: July 13, 2019, 03:13:14 PM by MarkD »

waveform

  • Playmaker Newbie
  • *
  • Posts: 28
    • View Profile
Re: Change Material (Shared)
« Reply #1 on: July 13, 2019, 02:38:09 PM »
that`s very easy to do that, you will able to do that by use the "set material color" action, then leave the Material field to None

MarkD

  • Junior Playmaker
  • **
  • Posts: 97
    • View Profile
Re: Change Material (Shared)
« Reply #2 on: July 13, 2019, 02:46:36 PM »
Yep - that changes the material for that instanced object, but the other objects that share that same material remain unchanged.  I'd like to fade out a material and have ALL of the objects that share that material fade out, too.

Thoughts on that?

waveform

  • Playmaker Newbie
  • *
  • Posts: 28
    • View Profile
Re: Change Material (Shared)
« Reply #3 on: July 13, 2019, 02:48:35 PM »
if you want to change the a lot amount of materials just drag drop the original material from project panel into material field

MarkD

  • Junior Playmaker
  • **
  • Posts: 97
    • View Profile
Re: Change Material (Shared)
« Reply #4 on: July 13, 2019, 03:06:04 PM »
Bam!  That did it!  Thank you!