Closed stevewoolcock closed 1 year ago
Thanks a lot for reporting the bug and your detailed report with a solution proposal. 👍
@mfandreich had a very clean solution to this problem. I have not not merged his solution yet, because it is part of a larger pull request that I‘m working on. If you need a quick fix in the meantime, please see https://github.com/Inspiaaa/UnityHFSM/pull/9/commits/f68818f764b3af869db144398d38aebbcb7dd5b2
Also ran into this (I ended up using the example from the docs and that works fine)
An
ArgumentNullException
is thrown when using theAddTransitionFromAny(to, condition, forceInstantly)
shortcut extension method for FSMs whereTStateId
is astring
type.This occurs because the extension method passes
default
through toCreateOptimizedTransition()
, where the default value for a string is null. I'm not sure there's a 'clean' way to fix this, other than adding string-specific extension method variants.