示例#1
0
 // set first pose
 void SetFirstPose()
 {
     foreach (HrcPair p in hrcPair)
     {
         NodeInfo i = new NodeInfo(p.Name.ToString());
         i.Tag = p;
         try
         {
             Transform o = animator.GetBoneTransform(p.Name);                // GetGameObject(p.Name);
             if (o != null)
             {
                 i.Trans   = o;
                 i.IsExist = true;
             }
         }catch (Exception)
         {
         }
         nodeInfos.Add(i);
     }
     foreach (NodeInfo i in nodeInfos)
     {
         if (i.IsExist)
         {
             HrcPair p = i.Tag as HrcPair;
             i.ParentInfo = FindNodeInfoParent(p.Parent);
             if (i.ParentInfo != i)
             {
                 i.ParentInfo.InfoChildren.Add(i);
             }
         }
     }
     CaptureInit();
 }
示例#2
0
 // set first pose
 void SetFirstPose()
 {
     foreach (HrcPair p in hrcPair)
     {
         NodeInfo i = new NodeInfo(p.Name);
         i.Tag = p;
         GameObject o = GetGameObject(p.Name);
         if (o != null)
         {
             i.Trans   = o.transform;
             i.IsExist = true;
         }
         nodeInfos.Add(i);
     }
     foreach (NodeInfo i in nodeInfos)
     {
         if (i.IsExist)
         {
             HrcPair p = i.Tag as HrcPair;
             i.ParentInfo = FindNodeInfoParent(p.Parent);
             if (i.ParentInfo != i)
             {
                 i.ParentInfo.InfoChildren.Add(i);
             }
         }
     }
     CaptureInit();
 }