mercredi 15 novembre 2017

Substance material random seed button randomize connect to unity UI button to change in play

I have a Substance material and I want to connect a Unity UI button by script to the Substance material Random Seed the Randomize button in the inspector in runtime. how to I do that? Can´t find anyone doing that. I know how to connect the slider to the Substance material, but not the Randomize button.

For the slider I use this: enter image description here

public void UpdateSubstances()
{
if (substance.HasProceduralProperty("Age"))
{
// Change substance property
substance.SetProceduralFloat ("Age", ageAmount);

// Apply change
substance.RebuildTextures ();
}
}

How to do it for Randomize button?

Thanks in advance, if someone knows!




Aucun commentaire:

Enregistrer un commentaire