protected void AutoMapping() { Dictionary <int, Transform> mapping = AvatarAutoMapper.MapBones(gameObject.transform, modelBones); foreach (KeyValuePair <int, Transform> kvp in mapping) { AvatarSetupTool.BoneWrapper bone = m_Bones[kvp.Key]; bone.bone = kvp.Value; bone.Serialize(m_HumanBoneArray); } }
protected void AutoMapping() { Dictionary <int, Transform> dictionary = AvatarAutoMapper.MapBones(base.gameObject.transform, base.modelBones); foreach (KeyValuePair <int, Transform> current in dictionary) { AvatarSetupTool.BoneWrapper boneWrapper = this.m_Bones[current.Key]; boneWrapper.bone = current.Value; boneWrapper.Serialize(base.serializedObject); } }
protected void AutoMapping() { using (Dictionary <int, Transform> .Enumerator enumerator = AvatarAutoMapper.MapBones(this.gameObject.transform, this.modelBones).GetEnumerator()) { while (enumerator.MoveNext()) { KeyValuePair <int, Transform> current = enumerator.Current; AvatarSetupTool.BoneWrapper bone = this.m_Bones[current.Key]; bone.bone = current.Value; bone.Serialize(this.serializedObject); } } }
public static Dictionary <int, Transform> MapBones(Transform root, Dictionary <Transform, bool> validBones) { AvatarAutoMapper mapper = new AvatarAutoMapper(validBones); return(mapper.MapBones(root)); }