public float GetSampledOrCurveValue(float time) { if (this.animated) { CurveRenderer curveRenderer = CurveRendererCache.GetCurveRenderer(this.clip, this.m_CurveBinding); if (curveRenderer == null) { Debug.LogError("The renderer is null!"); } return(curveRenderer.EvaluateCurveSlow(time)); } float result; if (!AnimationUtility.GetFloatValue(this.animationSelection.animatedObject, this.m_CurveBinding, out result)) { result = float.PositiveInfinity; } return(result); }
public static bool GetFloatValue(GameObject root, string relativePath, Type type, string propertyName, out float data) { return(AnimationUtility.GetFloatValue(root, EditorCurveBinding.FloatCurve(relativePath, type, propertyName), out data)); }