playMaker

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

Singularity

  • Playmaker Newbie
  • *
  • Posts: 13
    • View Profile
Set Material Float - Shared Material
« on: November 01, 2018, 08: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 01, 2018, 11:38:00 PM by Singularity »

Singularity

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

Singularity

  • Playmaker Newbie
  • *
  • Posts: 13
    • View Profile
Re: Set Material Float - Shared Material
« Reply #2 on: November 06, 2018, 11:51:31 PM »
Bump! Jean?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 13512
  • Official Playmaker Support
    • View Profile
Re: Set Material Float - Shared Material
« Reply #3 on: November 07, 2018, 01: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