I want to stop last active task and start next one. I tried this way, but it makes last task disabled and doesn't start next task. How is it possible to do what I need?
Code:
BehaviorDesigner.Runtime.Tasks.Task lastTask = null;
behaviorTree.GetActiveTasks().ForEach(action => {
lastTask = action
});
if (lastTask != null) {
lastTask.Disabled = true;
}