Hi, I tried NodeCanvas for a while and thought it was a plugin with many advantages.
So I am replacing the existing BT plugin with NodeCanvas in my company project.
In the meantime, I discovered the life cycle of Node Canvas, which could be a serious problem for me.
As shown in the picture above, when a new action is executed by’Reactive Evaluation’, the existing running node is not terminated, and OnExecute() of the action to be executed first is executed. OnStop() of the playing node must be called before OnExecute() of the node to be executed.
In the figure above, EnemyChase and DroneGatlingAttack are calling OnExecute() and OnStop() the same function of agent On Off. When EnemyChase is terminated by’Dynamic’, if it is called in the order of DroneGatlingAttack.OnExecute(), EnemyChase.OnStop(), the state of the agent set in DroneGatling.OnExecute() is overwritten in EnemyChase.OnStop().
Due to this, when DroneGatlingAttack is running, it is unintentionally executed while maintaining the value overwritten by EnemyChase.OnStop().