public static Transform[] GetProps(Transform transf) { Transform[] result; if (!transf.name.ToLower().Contains("jiguan")) { Transform[] handsObj = GameObjectPath.GetHandsObj(transf); Transform transform = (!(handsObj[0] == null)) ? handsObj[0].FindChild("Bip001 Prop2") : null; Transform transform2 = (!(handsObj[1] == null)) ? handsObj[1].FindChild("Bip001 Prop1") : null; if (transform == null && handsObj[0] != null) { transform = handsObj[0].FindChild("[@b]"); } result = new Transform[] { transform, transform2 }; } else { Transform transform3 = transf.Find("Bip001/Bip001 Pelvis/Bip001 Spine/Bone_Prop"); result = new Transform[] { null, transform3 }; } return(result); }
public static Transform[] GetTakePoint(Transform transf) { Transform[] handsObj = GameObjectPath.GetHandsObj(transf); Transform transform = (!(handsObj[0] == null)) ? handsObj[0].FindChild("[@b]") : null; Transform transform2 = (!(handsObj[1] == null)) ? handsObj[1].FindChild("[@a]") : null; return(new Transform[] { transform, transform2 }); }