Just a quicky, I was wondering if there was some kind of event that gets triggered when a GameObject is enabled/disabled? I realise there's the Reset on Disable checkbox, but unfortunately I don't want the entire script to reset as I set up some variables in the FSM on its first load. These values are constantly changing also, so I can't allow it to set these variables each time it activates - I want the script to retain the original values, and I don't really want the variables to be Global. I just want to trigger an event within the FSM every time the GameObject is 'activated' again.
I have got this working by having a second FSM which is set to Reset on Disable, and basically sends an event to the first FSM each time it's activated, but it feels a bit messy, just wondered if there was a nicer/cleaner way? Thanks for any help!