Ejemplo n.º 1
0
 public void SetColor(Renderer[] renderers, Color? c = null)
 {
     if (!canPickColor) return;
     //bool ed = bs.isDebug && !bs._Game;
     foreach (var a in renderers.SelectMany(a => /*ed ? a.sharedMaterials : */a.materials))
         if (a.shader.name == "Car/CarPain2 Bump" || a.shader.name == "Car/CarPain2")
         {
             a.SetFloat("_CandyScale", .7f);
             var color1 = c.HasValue ? c.Value : color;
             a.SetColor("_AmbientColor2", color1);
             //a.color = color1;
         }
 }