private void DoEquipClothes(int equipId, EquipBody dataEB, Action <bool> finished) { EquipCustomizationTool.GetInstantiateClothes(dataEB, delegate(SkinnedMeshRenderer renderer) { if (this.ActorTarget == null) { finished.Invoke(false); return; } if (equipId != this.mClothesId) { finished.Invoke(false); return; } Transform transform = XUtility.RecursiveFindTransform(this.ActorTarget.get_transform(), dataEB.slot); if (transform == null) { Debug.LogError("slot is no find, GameData.EquipBody id = " + dataEB.id); finished.Invoke(false); return; } SkinnedMeshRenderer component = transform.GetComponent <SkinnedMeshRenderer>(); if (renderer != null) { component.set_sharedMesh(renderer.get_sharedMesh()); List <Transform> list = new List <Transform>(); for (int i = 0; i < renderer.get_bones().Length; i++) { Transform transform2 = XUtility.RecursiveFindTransform(this.ActorTarget.get_transform(), renderer.get_bones()[i].get_name()); list.Add(transform2); } component.set_bones(list.ToArray()); component.set_shadowCastingMode(0); component.set_receiveShadows(false); component.set_useLightProbes(false); component.set_material(renderer.get_sharedMaterial()); } if (finished != null) { finished.Invoke(true); } }); }