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