Search Unity

Timeline Playables - how to animate a shader variable

Discussion in 'Timeline' started by BroncoBilli, Mar 4, 2020.

  1. BroncoBilli

    BroncoBilli

    Joined:
    Oct 8, 2017
    Posts:
    90
    I'm using a TextMeshPro and want to animate the "dissolve" variable on a shader that I replace the TMP's with. The new shader is "VacuumShaders/Advanced Dissolve/TextMeshPro/DistanceField (surface)". It has a float variable called "dissolve". Using Unity 2019.2.21f1.

    So, I go through the Timeline Playable Wizard and:
    * don't check "standard blend playable"
    * track binding type = GameObject
    * exposed references = MeshRenderer (why not?)
    * behavior variables = float, "dissolve"
    * clip caps = "all"

    I create it, then add an empty object to my scene, put a Timeline on it, then go to the timeline and add the playable...

    tmp window.JPG

    So, the behavior works, it's got that Dissolve on it, but I don't understand the "animation" part. It doesn't seem like I can animate this property over time graphically. There is no "record" button, no way to add or remove keys, no way to set starting end ending values over time. It seems like I MUST programmatically set the dissolve values by code. Is this assumption correct?!
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Can you double click on the inline curve window to add a new key? The inline curve should allow you to add/remove keys and edit the resulting curve.