private void LoadScene(HScene scene) { sf.Reset(); ac.Init(); string[] onHolds = scene.GetOnHolds(); for (int i = (int)AvatarControl.BODYS.RH; i <= (int)AvatarControl.BODYS.LF; i++) { if (!string.IsNullOrEmpty(onHolds[i])) { Transform t = holds.Find(onHolds[i]); if (t != null) { Hold hold = t.gameObject.GetComponent <Hold>(); sf.SetFocusHold(i, hold); ac.SetFixed(i, true); } } } cs.SetComments(scene.GetComments()); if (scene.IsPose()) { ik.SetPose(scene.GetPose(), scene.GetPRotate()); } else { ik.InitAvatar(); } }
private void LoadScene(HScene scene) { sf.Reset(); string[] onHolds = scene.GetOnHolds(); //Debug.Log(onHolds); for (int i = (int)SceneFocus.Choice.RH; i <= (int)SceneFocus.Choice.LF; i++) { if (onHolds[i] != null && onHolds[i].Length > 0) { Transform t = holds.Find(onHolds[i]); if (t != null) { Hold hold = t.gameObject.GetComponent <Hold>(); sf.SetFocusHold(i, hold); } } } cs.SetComments(scene.GetComments()); }