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

Mechanim, changing one state changes another

Discussion in 'Animation' started by DDNA, Mar 17, 2017.

  1. DDNA

    DDNA

    Joined:
    Oct 15, 2013
    Posts:
    116
    I keep running into this problem where 2 states become intrinsically linked together.

    For example I have
    SubStateA->State->BlendTree->Motion
    and
    SubStateB->State->BlendTree->Motion

    So in the editor I drag a new clip onto the blendtree in SubStateA, and when I go back to SubStateB the motion on that blendtree has been changed as well and vice versa.

    I am assuming this is not expected behavior. Right now in my project I have a series of blendtrees that I can not change or unlink. I have filed this as a bug 891990
     
  2. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,294
    Did you copy-and-paste the blendtrees?

    The animator allows you to copy and paste, but you should never do that, because it's hillariously broken. You will get reference copies instead of copies of the data, so what you're seeing now will happen.

    We had Unity crash a bunch because (I believe) the animator tried to follow a copy-pasted sub state machine into a different animator controller.

    Great that you submitted a bug report!
     
  3. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    Indeed. Bug reports are very appreciated
    I just saw this in the bug list. I plan to look at it soon. This is the first time I hear about this happening in a Controller that was not generated using scripts.

    This often happens with script generated controllers, because everything in a Controller is an Asset (even though it's all hidden), so if you're not careful, you can end up referencing things left and right.