UnityEditor.RotationCurveInterpolation.GetPrefixForInterpolation C# (CSharp) Method

GetPrefixForInterpolation() public static method

public static GetPrefixForInterpolation ( Mode newInterpolationMode ) : string
newInterpolationMode Mode
return string
        public static string GetPrefixForInterpolation(Mode newInterpolationMode)
        {
            if (newInterpolationMode == Mode.Baked)
            {
                return "localEulerAnglesBaked";
            }
            if (newInterpolationMode == Mode.NonBaked)
            {
                return "localEulerAngles";
            }
            if (newInterpolationMode == Mode.RawQuaternions)
            {
                return "m_LocalRotation";
            }
            return null;
        }

Usage Example

 internal static EditorCurveBinding[] ConvertRotationPropertiesToInterpolationType(EditorCurveBinding[] selection, RotationCurveInterpolation.Mode newInterpolationMode)
 {
     EditorCurveBinding[] result;
     if (selection.Length != 4)
     {
         result = selection;
     }
     else if (RotationCurveInterpolation.GetModeFromCurveData(selection[0]) == RotationCurveInterpolation.Mode.RawQuaternions)
     {
         EditorCurveBinding[] array = new EditorCurveBinding[]
         {
             selection[0],
             selection[1],
             selection[2]
         };
         string prefixForInterpolation = RotationCurveInterpolation.GetPrefixForInterpolation(newInterpolationMode);
         array[0].propertyName = prefixForInterpolation + ".x";
         array[1].propertyName = prefixForInterpolation + ".y";
         array[2].propertyName = prefixForInterpolation + ".z";
         result = array;
     }
     else
     {
         result = selection;
     }
     return(result);
 }
All Usage Examples Of UnityEditor.RotationCurveInterpolation::GetPrefixForInterpolation