UnityEditorInternal.AnimationWindowKeyframe.GetIndex C# (CSharp) Méthode

GetIndex() public méthode

public GetIndex ( ) : int
Résultat int
        public int GetIndex()
        {
            for (int i = 0; i < this.curve.m_Keyframes.Count; i++)
            {
                if (this.curve.m_Keyframes[i] == this)
                {
                    return i;
                }
            }
            return -1;
        }

Usage Example

 public static CurveSelection AnimationWindowKeyframeToCurveSelection(AnimationWindowKeyframe keyframe, CurveEditor curveEditor)
 {
     foreach (CurveWrapper animationCurve in curveEditor.animationCurves)
     {
         if (animationCurve.binding == keyframe.curve.binding && keyframe.GetIndex() >= 0)
         {
             return(new CurveSelection(animationCurve.id, curveEditor, keyframe.GetIndex()));
         }
     }
     return((CurveSelection)null);
 }
All Usage Examples Of UnityEditorInternal.AnimationWindowKeyframe::GetIndex