pub fn update_leaf_nodes(
    leaf_nodes: ResMut<'_, LeafNodeInsertWitness>,
    cmds: Commands<'_, '_>,
    was_leaf_node: Query<'_, '_, (Entity, &Node), (Changed<Node>, With<LeafNode>)>,
    wasnt_leaf_node: Query<'_, '_, (Entity, &Node), (Changed<Node>, Without<LeafNode>)>,
    no_node: Query<'_, '_, Entity, (Without<Node>, With<LeafNode>)>
)
Expand description

Add/remove LeafNode component according to the current Node state.

Note that the change won’t be visible untill the next flush.