Procedural Material (Substance) Scripting

According to the scripting reference documentation for ProceduralMaterials,

"In order to get a Procedural Material used by an object, use the Renderer.material as a ProceduralMaterial."

However, if I were to use the following code,

ProceduralMaterial substance = renderer.material as ProceduralMaterial;

The substance always returns null.

As the scripting example suggests, using sharedMaterial instead of material would work but I have more than 1 object sharing the same material and I don’t want the effect applied to all. Creating a copy of the sharedMaterial using Instantiate doesn’t work as well, the effect still gets applied to all.

Is this a bug? Is there currently a work around for this?

It is a known bug and has been fixed on our side, it will be included in the next Unity release. The only workaround for now is to create your instances in the Substance inspector offline.

Alright. Thanks for the information.

Has this been fixed? It seems that this negates nearly all the value of substances.

I just tested it and it works as expected in 3.5.