Right well, that’s officially embarrassing that I missed noticing there was a callback haha. Although the callback would only notify of a single ‘event’, ie. “we’ve ended’, I’ll just set a BB string variable to the transition it should use, then call the callback and let the statemachine use that, so should work just fine. Plus it exposes the last transition to us, which is distinctly very helpful for debugging.
I was just looking at your execute-function instead as to all intents and purposes that actually would be perfect, however we use inner-classes for sub states (so for example one global state, say class AI, then three sub states as inner-classes ai_Follow, ai_Chase,.. ai_WhatEvs), and the execute-function methods don’t appear to include nestedtypes so was just adding that in..
.. and adding the inner-class methods there along with the GetType().GetMethods…
However having just checked this post I’m pretty sure I have all I need to get by tbh 🙂
Many thanks for all the help, would be great to see nestedtype methods in the list so we can use execute-function for those, and especially since unity’s send/receive message doesn’t support inner-classes either, however I’m more than happy right now and can crack on I reckon.
Cheers!
Login
Register
By registering on this website you agree to our Privacy Policy.