Using SetBool on animation trigger parameter

I noticed the code allow you to use SetBool to enable and disable a trigger.
@Mecanim-Dev is this an expected behaviour or it’s something that may break in any moment and no longer work?

this is expected and this is supported.
A trigger is simply a bool with some semantic.

1 Like

Thank you!

I noticed you can’t check a trigger for a false condition, since it’s just a bool could you expose it as such in the transition conditions?
It would be useful sometimes to validate that the trigger has not fired in certain transitions.

I just had a case where a trigger was being reset despite the code not containing any calls to ResetTrigger - and burned half a day tracking it down before realising SetBool could be used in this way. It’s a good feature and awesome to know, though I would’ve saved some time had this usage been made clearer in the docs for both ResetTrigger and SetBool.