Search Unity

Dynamic values for Timeline

Discussion in 'Animation' started by SomehowLuke, Oct 15, 2019.

  1. SomehowLuke

    SomehowLuke

    Joined:
    Nov 11, 2015
    Posts:
    34
    Hello,
    I was wondering if there is a possibility to have dynamic values for timeline-animation.

    What I want to achieve:
    After the player finishes a level an "finish level" animation sequence starts to show up and shows the result of played level (in this example player reached 75% of 100% and to finish level he has to reach 50%).
    example sequence: Cake diagram zooms in, progress bar must have % fills up, (image.fillamount = 0 to 0.5f) after that the reached % progress fills up, once the animation reached must have a particle effect will be played, once the reached is at its point (image.fillamount = 0- 0.75f) it zooms back to its original point.

    This is just an example and short sequence shown, the one I want to build is a little more complex.

    What I do now:
    is having a c# code sequence (with DOTween) that follows all these steps. But to change or add animation steps it is kind of hard for artists to do and alsways need to explain me, as an non artist, what they want to achieve, what kind of sequences should be added.

    What I would like to achieve:
    I would like to use the timeline to create this sequence and using variables that I fill by code. For example: I have a "timeline-variable" float fReachedPercentage which I can dynamically set in my code. The artists sets the timeline animation of image.fillamount from 0 to fReachedPercentage (and not a fixed value).
    So I want to have always the same animation sequence, but the value to what it should animate is dynamically.

    Is that somehow possible?
    Thank you very much for your help and best regards,
    Markus