Answer the question
In order to leave comments, you need to log in
How to setup correct SkinnedMeshRenderer in Unity 3d?
There are several prefabs based on them (using them as bones) create a Skinned object (cylinder)
now I do this (each prefab has the name Cell + number)
SkinnedMeshRenderer NewRenderer = GameObject.Find("Cylinder").GetComponent(typeof(SkinnedMeshRenderer)) as SkinnedMeshRenderer;
Transform[] MyBones = new Transform[col];
for (int i = 1; i < col; i++)
MyBones[i] = GameObject.Find("Cell" + (i).ToString()).transform;
NewRenderer.bones = MyBones;
NewRenderer.rootBone = GameObject.Find("Cell0").transform;
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