Question by
jmgek · Feb 23 at 07:37 PM ·
material color
Is there a better way to get a skinned mesh material?
I need to modify the color of a skinned mesh material / renderer on a character at runtime.
Currently my solution is:
public void SetColor(Color color)
{
var childMats = mySkinnedMeshRenderer.GetComponentsInChildren<SkinnedMeshRenderer>();
childMats[0].materials[0].color = color;
I'm not too happy with that, please tell me this isn't the only way.
Comment
Your answer
Follow this Question
Related Questions
New Material Default Color 0 Answers
Material in asset window is brighter than its real color 0 Answers
Material changing... 1 Answer
Do I need to reconfigure materials for unity 2017? 1 Answer
Shader displaying with weird colors 1 Answer