Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Is it possible to set a timeline-clip to have indefinite duration?

Discussion in 'Timeline' started by TMPxyz, Jan 16, 2018.

  1. TMPxyz

    TMPxyz

    Joined:
    Jul 20, 2012
    Posts:
    766
    I've watched several keynotes on timelines and played with the timeline market demo. I've some questions about the duration of the want to know if it's possible to set a timeline-clip to have indefinite duration and let another timeline-clip to start at the end of it in RUNTIME?
    (By timeline-clip, I mean the small solid segment in timeline editor)

    Here I've some use-cases as examples:
    1. Assume I've a talking timeline, in which the audio clip is set in RUNTIME, and there're also some generic facial emotion (loop) and particle-sys tracks playing when the audio is active.
    As the audio clip can be different length, is it possible to set it in timeline that the other clips (facial/particle) to lock to the same length as the audio clip?

    2. Assume we've a multi-part dialog timeline, there're bgm, particles, background character animations, facial animation , and voice clips, etc.
    Now I want the dialog to wait for user-input at the end of each part before proceeding, is it possible to get it done in one timeline? We don't want to cut it into several timelines and replicate the bgm/particles/mob-characters settings.
     
  2. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    789
    What people usually seem to do is set the speed of the timeline to 0 through a script.
    The advantage of that compared to simply stopping the time line is that animations will just freeze, same as virtual cinemachine cameras.

    But I wonder if there is a better way.
    Something that would allow us to keep playing an idle or waiting animation while the player is selecting an option.

    Because just freezing is obviously not the best solution.
     
  3. cirocontinisio

    cirocontinisio

    Joined:
    Jun 20, 2016
    Posts:
    884
    Hey @TMPxyz, I was doing just that in my demo/talk last year at Unite Austin:



    If you want, I provide the project to go with it so you can dig in the code: https://github.com/UnityTechnologies/ATerribleKingdom

    Hope it helps!
     
    TMPxyz likes this.