Open
Description
Bevy version
0.16
Problem
The detect_text_needs_rerender
use the Text
and Text2d
components to discriminate between UI and 2d root text nodes. But both query for all TextSpan
s, this causes two problems:
- All
TextSpan
s are checked twice for changes. - If there is an error with a
TextSpan
detect_text_needs_rerender::<Root>
reports the type of the current root discriminator:
once!(warn!("found entity {} with a TextSpan that has a TextLayout, which should only be on root \
text entities (that have {}); this warning only prints once",
entity, core::any::type_name::<Root>()));
But since the system checks all TextSpan
s for both roots the reported root Text
or Text2d
is determined by the system order, not the type of the root the TextSpan
belongs to.