Unity SkinnedMeshRenderer bind 问题
狄学长shrekshao
2018-05-04
我跟随这个教程中把skinnedMeshRenderer bind 到bones上 https://www.youtube.com/watch?v=ZBLvKR2E62Q&index=10&list=PLFt_AvWsXl0f4c56CbvYi038zmCmoZ4CQ
但是
public SkinnedMeshRenderer shirtMesh;
public SkinnedMeshRenderer targetMesh;
// Use this for initialization
void Start () {
//SkinnedMeshRenderer sm = Instantiate(shirtPrefab).GetComponent<SkinnedMeshRenderer>();
SkinnedMeshRenderer sm = Instantiate<SkinnedMeshRenderer>(shirtMesh);
sm.transform.parent = targetMesh.transform.parent;
sm.bones = targetMesh.bones;
sm.rootBone = targetMesh.rootBone;
}
求助