Reply To: Node Canvas does not reset the tree

NodeCanvas Forums Support Node Canvas does not reset the tree Reply To: Node Canvas does not reset the tree

#14064
centaurianmudpig
Participant

The good news is that it’s not a problem with Node Canvas. It’s more to do with the way I was expecting order of events.

I set a counter variable for some initialisation to run just once each time when enabled. After trying to replicate it I found the BT runs immediately when enabled, just before I increase counter variable. So it skips the filter (as the counter is not yet updated) and continues running normally (reaching the loop), by which time the counter is then updated.

I can get around this by setting OnEnable to DoingNothing on the Tree and start the behaviour in the code after increasing the counter.