private void Awake()
        {
            _Graph = PlayableGraph.Create();

            var animOutput = AnimationPlayableOutput.Create(_Graph, "AnimationOutput", null);

            _sourcePlayable = ScriptPlayable <CustomPlayable> .Create(_Graph, 1);

            animOutput.SetSourcePlayable(_sourcePlayable);

            _sourcePlayable.SetDuration(Duration);
            RegisterAnimations();

            _Graph.Play();
        }
 private void OnDurationChanged()
 {
     _sourcePlayable.SetDuration(Duration);
 }