GetFloatValue() public static method

public static GetFloatValue ( GameObject root, EditorCurveBinding binding, float &data ) : bool
root UnityEngine.GameObject
binding EditorCurveBinding
data float
return bool
示例#1
0
        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);
        }
示例#2
0
 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));
 }