This section of the documentation contains details on the Substance API that we provide via the Substance plugin. Using the Substance API, you can write scripts to update and change Substance parameters at runtime.
Substance.Game is the assembly that contains the classes used for scripting. These classes are as follows:
Substance.Game.Substance: References the sbsar
Substance.Game.SubstanceGraph: Individual graph in the sbsar. (used to be ProceduralMaterial in Unity 2017)
- Create an instance of SubstanceGraph
2. Set parameters on the graph instance.
The value in quotes is the parameter Identifier set in Substance Designer.
In the Unity Inspector, you can mouse over a parameter to reveal a tooltip that showcases the name of the Identifier set in Substance Designer.
3. Queue the Substance for Rendering: QueueForRender() will add the substance graph to a queue. This list will be processed by the next call to RenderSubstancesAsync or RenderSubstancesSync.
Currently, we only support x86_64 Architecture. You need to set x86_64 in the Build Settings