Search Unity

Inactive animator states prevent changes to properties changed by those states from script

Discussion in 'Animation' started by maikkanerva, Dec 14, 2021.

  1. maikkanerva

    maikkanerva

    Joined:
    Dec 14, 2018
    Posts:
    27
    I've noticed that sometimes when an animator state changes a property of an object, for example sets game object active/inactive, changing this property through script does nothing even though the current played animator state (a different one) does not affect that property. I've tried to toggle on Write Defaults on and off, but this behavior persists.

    Is this normal behavior, and how can one avoid situations like this? Only way I've found to battle this is to have the other animation state also affect the property the way it should be during that animation.