playMaker

Author Topic: Set Material Float - Shared Material  (Read 2081 times)

Singularity

  • Playmaker Newbie
  • *
  • Posts: 13
Set Material Float - Shared Material
« 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


« Last Edit: November 02, 2018, 02:38:00 AM by Singularity »

Singularity

  • Playmaker Newbie
  • *
  • Posts: 13
Re: Set Material Float - Shared Material
« Reply #1 on: November 04, 2018, 01:20:06 PM »
Help  :)

Singularity

  • Playmaker Newbie
  • *
  • Posts: 13
Re: Set Material Float - Shared Material
« Reply #2 on: November 07, 2018, 01:51:31 AM »
Bump! Jean?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Set Material Float - Shared Material
« Reply #3 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