Reply To: Maintaining state with actions

Forums 💬 NodeCanvas 🗨️ General Discussion Maintaining state with actions Reply To: Maintaining state with actions

#14952
Gavalakis
Keymaster

    Hey,

    OnInit is called just once before first execution, so it’s not a good candicate. It’s best to use OnStop since that’s called whenever you call EndAction or the Action ends due to any other reason, like being interrupted for example.
    Or you can reset some variables within OnExecute which is called once on EACH execution. Depending on what you are after.