Exemplo n.º 1
0
 protected override void OnValidate()
 {
     base.OnValidate();
     if (!this.gameObject.activeInHierarchy)
     {
         return;
     }
     IconManager.SetIcon(this.gameObject, IconManager.LabelIcon.Red);
     grip = this.transform.Find("Grip");
     if (!grip)
     {
         grip = new GameObject("Grip").transform;
         grip.SetParent(this.transform);
     }
 }
Exemplo n.º 2
0
 protected override void OnValidate()
 {
     base.OnValidate();
     if (!this.gameObject.activeInHierarchy)
     {
         return;
     }
     grip = this.transform.Find("Grip");
     if (!grip)
     {
         grip = CreateDefaultGrip();
     }
     IconManager.SetIcon(this.gameObject, IconManager.LabelIcon.Red);
     if (editPose == null)
     {
         editPose = new EditPose(this);
     }
     if (editPose.ragdollHand == null)
     {
         editPose = new EditPose(this);
     }
     if (creature == null)
     {
         creature = this.GetComponentInParent <Creature>();
     }
     if (creature)
     {
         if (openPose)
         {
             openPoseFingers = openPose.GetFingers(side);
         }
         if (closePose)
         {
             closePoseFingers = closePose.GetFingers(side);
         }
         if (openPose && closePose)
         {
             UpdatePoseThumb(globalRatio ? closeWeight : thumbCloseWeight);
             UpdatePoseIndex(globalRatio ? closeWeight : indexCloseWeight);
             UpdatePoseMiddle(globalRatio ? closeWeight : middleCloseWeight);
             UpdatePoseRing(globalRatio ? closeWeight : ringCloseWeight);
             UpdatePoseLittle(globalRatio ? closeWeight : littleCloseWeight);
         }
     }
 }