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?