Hi there... beginning to be a little shy to take up all this time of yours, but I'm completely stuck.
I need to use one of your shaders on something that is not tk2d, then I need to change the color (trying to make some shadows...), I spelunked in your scripts and I think I found how you changed your colors, but then it does not seem to work. (it works with other shaders though)
here is the script (keep in mind it is testing script
using UnityEngine;
using System.Collections;
public class ShadowOnVaVoir : MonoBehaviour {
Color[] colors;
Color myColor;
void Awake() {
myColor = new Color(0, 0, 0, 0.5f);
Color[] colorsBegin = GetComponent<MeshFilter>().sharedMesh.colors;
colors = new Color[colorsBegin.Length];
GetComponent<MeshFilter>().sharedMesh.colors = colors;
}
void Update() {
renderer.material.SetColor("Color", myColor);
renderer.material.color = myColor;
int i = colors.Length;
while (i-->0) {
colors[i] = myColor;
}
}
}
As usual, thanks for your time and commitment