Search Unity

Mecanim Default Values

Discussion in 'Animation' started by MrMika, Sep 4, 2014.

  1. MrMika

    MrMika

    Joined:
    Aug 3, 2014
    Posts:
    2
    Hello everyone!

    After having some troubles with mecanim when switching animations, i posted this question, where i explain that i want to go from one animation to the other, but because the transform property is not animated in the second clip, the position of the object stays locked at (0, 0, 0). However i didn't get an asnwer so i tried to find out a solution for my problem, and then i found this blog entry that says that if properties are not animated in both clips, it will go back to the default value.

    So, i would like to know if this is going to change in the next updates or if there's already a way of doing this without going back to default values.
     
  2. pierrepaul

    pierrepaul

    Unity Technologies

    Joined:
    Jun 19, 2012
    Posts:
    162
    Hi!

    In 5.0 we have added a property on the State to "Write back default values". Meaning that if turned on, it will write back the default values of all animated properties ( on a Controller wide-basis) that are not animated in that State.

    By default, its "on", so we don't change the behavior that we had before.

    So if you want the non-animated properties of a State to keep the value it had previously, simply turn it off.

    Im not sure I understand 100% the problem you are having, but hopefully this helps.
     
    Bretchkin likes this.
  3. MrMika

    MrMika

    Joined:
    Aug 3, 2014
    Posts:
    2
    Another reason to stay excited about 5.0!
    Thanks for your reply.
     
  4. curiouspers

    curiouspers

    Joined:
    Aug 7, 2014
    Posts:
    19
  5. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    Can you explain this another way?

    None of this makes sense to someone not already familiar with Unity Animation, all I can describe is symptoms similar ot the OP as being a problem.
     
  6. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    390
    When are these "default values" captured for the controller-wide animated properties? For example, is this done on Animator.Start/Awake() or Animator.OnEnable().
     
  7. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    390
    OleksandrMartysh likes this.