Hi Pharan,
Thanks for the reply!
So I'm trying to get property blocks to work, however I'm not having any luck:
readonly float[] _values = { 0, 0.85f, 0.2f };
protected void Start() {
for (int i = 0; i < SkeletonRenderSeparator.partsRenderers.Count; i++) {
MaterialPropertyBlock mpb = new MaterialPropertyBlock();
mpb.SetFloat("_Heat", _values[i]);
SkeletonRenderSeparator.partsRenderers[i].MeshRenderer.SetPropertyBlock(mpb);
Debug.Log(string.Format("Setting heat of {0} to: {1}", SkeletonRenderSeparator.partsRenderers[i].gameObject.name, _values[i]));
}
}
I am getting the correct log results, unfortunately I'm not actually seeing the change. Any ideas? This is the property in the shader:
_Heat ("Heat", Range(0.0, 1.0)) = 0.0
Solved it! I needed to uncheck "Copy Property Block" on the SkeletonRenderSeparator. That's awesome, thanks!
So this is great for my current setup, but going forward if I wanted an individual material per renderer, is there a way to replace each material? As I have a lot of slots, so the separator allows me to group these up. Where if I had to change the material on each slot, it would be somewhat annoying.