Search Unity

Use Timeline to toggle Unity editor playback after last range marker?

Discussion in 'Timeline' started by ehanceMuse, Oct 24, 2019.

  1. ehanceMuse

    ehanceMuse

    Joined:
    Oct 10, 2019
    Posts:
    10
    Hi all,

    I'm using Timeline record some sequences of animation from Unity. I'm looking to find a way to toggle Unity's playback off once Timeline reaches the end of it's range marker so that I can record specific lengths and not stop Unity Recorder manually for each shot.

    What's the best way to cancel the Unity editor 'Play' button once Timeline reaches the end of it's range marker? Is something already there to help with this or do we need to script something like I see in this page (and use it along with a control track)?

    https://answers.unity.com/questions/161858/startstop-playmode-from-editor-script.htm

    Thanks in advance for any help, really liking this tool so far.

    -Eric
     
  2. ewanuno

    ewanuno

    Joined:
    May 11, 2017
    Posts:
    39
    i have a Signal called Pause which triggers a signal Reciever which calls PlayableDirector.Pause on the timeline.
    0 lines of code, and it works in editor mode just by setting the Signal Reciever to "Editor and Playmode"
     
  3. ehanceMuse

    ehanceMuse

    Joined:
    Oct 10, 2019
    Posts:
    10
    Sounds like a great idea. I'll brush up on signals some, may have a follow up question or two later.

    Thank you!

    -Eric