Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

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:
    58
    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