Play TimelineEditor from script

I want to play TimelineEditor from my custom script.

I update TimelineEditor.playableDirector.time and get EditorWindow of Timeline and repaint it every frame, however it did not work…

Add the following calls:
playableDirector.DeferredEvaluate();
GameView.RepaintAll();
SceneView.RepaintAll();

The DeferredEvaluate will evaluate the timeline the next time the views are repainted.

Thanks, but It didn’t work…

Can I update TimelineEditor from code in the future version?

Can provide some example code of what you are trying?

I’m sorry I found my code was bad. Finally, It worked.
Thank you.

How do you reference the playable timeline prefab thriugh code? I vant find info anywhere but i want to achieve starting the timeline or playable through code aswell

Nvm…what i was looking for is using unityengine.playables etc etc ^^