public void UpdateValid(BehaviourTree tree) { RemoveFromClassList("invalid"); if ((tree.FindParent(node) || node is Entry) && !node.IsValid) { AddToClassList("invalid"); } }