Answer the question
In order to leave comments, you need to log in
How to pass material to SkinnedMeshRenderer?
Good afternoon. Please tell me how to transfer the material to the SkinnedMeshRenderer, but not to key 0 but to key 1.
//Так он меняет первое значение
var view = character.GetComponentInChildren<SkinnedMeshRenderer>();
view.material = material;
//А вот так по идее должен бы поменять, но не меняет
var view = character.GetComponentInChildren<SkinnedMeshRenderer>();
view.materials[1] = material;
// Пробовал и так
var view = character.GetComponentInChildren<SkinnedMeshRenderer>();
view.materials.SetValue(material , 1);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question