Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. 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.

Question Tween Track Keep Position

Discussion in 'Timeline' started by Nerull22, Jun 6, 2023.

  1. Nerull22

    Nerull22

    Joined:
    Dec 31, 2010
    Posts:
    14
    Hi, I'm working on getting tween timeline tracks to keep their position after the track finishes. I'm using the Unity samples here: https://docs.unity3d.com/Packages/com.unity.timeline@1.6/manual/smpl_custom_tween.html

    Which in the notes states that it will return to it's original position when the track is over. Does anyone know how to change this behavior? I've been attempting to modify the position at the end of the clip with OnBehaviourPause, and GraphStop, and PlayableDestroy, etc. But I have had -NO- luck. Does anyone have any advice here? Any information will be greatly appreciate.
     
    Lukas-Labaj likes this.
  2. Lukas-Labaj

    Lukas-Labaj

    Joined:
    Nov 22, 2012
    Posts:
    37
  3. Yuchen_Chang

    Yuchen_Chang

    Joined:
    Apr 24, 2020
    Posts:
    140
    The Default position (when there's no clips) is stored in
    TweenMixerBehaviour.m_InitialPosition
    . If you add code to update it, you could keep the position.