/// <summary> /// ボーン置換 /// </summary> /// <param name="boneReplaceDict"></param> public void ReplaceBone(Dictionary <Transform, Transform> boneReplaceDict) { for (int i = 0; i < rootList.Count; i++) { rootList[i] = MeshUtility.GetReplaceBone(rootList[i], boneReplaceDict); } }
//========================================================================================= /// <summary> /// ボーンを置換する /// </summary> /// <param name="boneReplaceDict"></param> public override void ReplaceBone(Dictionary <Transform, Transform> boneReplaceDict) { if (centerTransform) { centerTransform = MeshUtility.GetReplaceBone(centerTransform, boneReplaceDict); } }
//========================================================================================= /// <summary> /// ボーンを置換する /// </summary> /// <param name="boneReplaceDict"></param> public override void ReplaceBone(Dictionary <Transform, Transform> boneReplaceDict) { for (int i = 0; i < useTransformList.Count; i++) { useTransformList[i] = MeshUtility.GetReplaceBone(useTransformList[i], boneReplaceDict); } clothTarget.ReplaceBone(boneReplaceDict); }
/// <summary> /// スキンメッシュレンダラーのボーン置換 /// </summary> /// <param name="skinRenderer"></param> private void ReplaceSkinMeshRenderer(SkinnedMeshRenderer skinRenderer, Dictionary <Transform, Transform> boneReplaceDict) { // ルートボーン置換 skinRenderer.rootBone = MeshUtility.GetReplaceBone(skinRenderer.rootBone, boneReplaceDict); // ボーン置換 var bones = skinRenderer.bones; for (int i = 0; i < bones.Length; i++) { bones[i] = MeshUtility.GetReplaceBone(bones[i], boneReplaceDict); } skinRenderer.bones = bones; }
//========================================================================================= /// <summary> /// ボーンを置換する /// </summary> public void ReplaceBone(Dictionary <Transform, Transform> boneReplaceDict) { if (originalBones != null) { for (int i = 0; i < originalBones.Length; i++) { originalBones[i] = MeshUtility.GetReplaceBone(originalBones[i], boneReplaceDict); } } if (boneList != null) { for (int i = 0; i < boneList.Length; i++) { boneList[i] = MeshUtility.GetReplaceBone(boneList[i], boneReplaceDict); } } }