Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- using Medvedya.SpriteDeformerTools;
- public class EXAMPLE_modify_material : MonoBehaviour {
- public Material referenceMaterial;
- public Color color = Color.white;
- Color oldColor;
- void Update () {
- if (oldColor != color)
- {
- oldColor = color;
- foreach (Material mat in BaseOfMaterials.GetAllMaterialsByReferenceMaterial(referenceMaterial))
- {
- mat.color = color;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement