protected override object ApplyPlayableValue(object currentValue, Playable playable, float playableWeight) { ScriptPlayable <AnimatorFloatParamPlayableBehaviour> scriptPlayable = (ScriptPlayable <AnimatorFloatParamPlayableBehaviour>)playable; AnimatorFloatParamPlayableBehaviour inputBehaviour = scriptPlayable.GetBehaviour(); return(Mathf.Lerp((float)currentValue, inputBehaviour._value, playableWeight)); }
public override Playable CreatePlayable(PlayableGraph graph, GameObject owner) { ScriptPlayable <AnimatorFloatParamPlayableBehaviour> playable = ScriptPlayable <AnimatorFloatParamPlayableBehaviour> .Create(graph, _data); AnimatorFloatParamPlayableBehaviour clone = playable.GetBehaviour(); clone._clip = this; return(playable); }