I created my first shader by following this video. Dissolve Shader Video Link
In a Coroutine,i took the Material's component from the object:
PalaceMaterial = palaceInstance.GetComponent <Renderer> () .material;
I set the parameter to 0:
PalaceMaterial.SetFloat ("_ CutoffHeight", 0);
To have this effect, I had to modify the parameter "CuttoffHeight" gradually putting it in Update ()
PalaceMaterial.SetFloat("_CutoffHeight", Mathf.MoveTowards(PalaceMaterial.GetFloat("_CutoffHeight"), CutoffHeight, 100 * Time.deltaTime));
I applied this to all objects. Every 2 seconds i instantiate an "invisible object" (CutoffHeight set to 0) and in Update() it change the value gradually. Now I would like to change this parameter to all objects that use this shader simultaneously. I hope i was clear.
Video of my project : Project, Dissolve_Effect
I would like to change the "_CutoffHeight" parameter simultaneously in all the cubes that are in the first platform, then in the second one, etc. etc. Do you have any idea?