Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Singularity on November 01, 2018, 11:53:19 AM

Title: Set Material Float - Shared Material
Post by: Singularity on November 01, 2018, 11:53:19 AM
Hi,

In my game I have a custom shader + material with a float governing dynamic snow coverage.  This float is updated at runtime as needed.

Many different objects share this material and all should be updated without creating instances.

The set material float action (with material referenced, not game object / renderer) seems to create instances, which then fail to update.  On looking at the code it does not seem to reference sharedMaterial.

Is there a way to make this work correctly?

edit - unity 2017.2.0f3, playmaker 1.8.3.f4

Thanks


Title: Re: Set Material Float - Shared Material
Post by: Singularity on November 04, 2018, 01:20:06 PM
Help  :)
Title: Re: Set Material Float - Shared Material
Post by: Singularity on November 07, 2018, 01:51:31 AM
Bump! Jean?
Title: Re: Set Material Float - Shared Material
Post by: jeanfabre on November 07, 2018, 03:12:22 AM
Hi,

have you tried with a regular shader? like modifying the _Metallic value of a standar shader.

 it works here. so maybe it's your shader? could you share a repro scene, with just two cubes and that shader with your fsm trying to change that float?

 Bye,

 Jean