public static void AttachDress(uint presentid, GameObject go) { var dData = XDestructionLibrary.GetPartsInfo(presentid); var present = XAnimationLibrary.AssociatedAnimations(presentid); XParts xpart = go.GetComponent <XParts>(); if (dData != null && dData.Length > 0) { SkinnedMeshRenderer[] renders = new SkinnedMeshRenderer[dData.Length]; for (int i = 0; i < dData.Length; i++) { var t = go.transform.Find(dData[i].PerfectPart); if (t == null) { Debug.LogError("DestructionPart config error: " + presentid + " perfectpart: " + dData[i].PerfectPart); continue; } renders[i] = t.GetComponent <SkinnedMeshRenderer>(); } InitWithPerfectPart(dData, "Assets/BundleRes/FBXRawData/" + present.Prefab + "/", renders, xpart); } else { XFashionLibrary.DrawRoleWithPresentID(presentid, go); } }
public static GameObject GetDummy(uint id) { XEntityStatistics.RowData data = AssociatedData(id); if (data == null) { return(null); } return(XAnimationLibrary.GetDummy(data.PresentID)); }