UI Extraction filtering
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## What problem does this solve or what need does it fill?
At the moment if you add a custom UI extraction function there is no way to disable the built-in extraction, so you have to create new components and systems as well.
For example, imagine you want to create an `SdfTextPlugin` that renders text using SDFs. A naive implementation would add an `extract_sdf_text_uinodes` function to the extract schedule that queries for the text components and an `SdfText` marker component. But this won't work as the `extract_text_uinodes` function will find the same text components and the text will be extracted and rendered twice.
Instead, you would need to make `SdfText` into a newtype that wraps `Text` and reimplement all the text systems with queries for `SdfText` instead of `Text`, replicating hundreds of lines of code.
## What solution would you like?
Add marker components to all the UI node bundles that the extraction functions can filter on.
`Nodebundle` and `ImageBundle` would have `ExtractUiNode` and `ExtractUiNodeBorder` components, and `TextBundle` would also have an `ExtractUiNodeText`, etc.
Contributor guide
Assessment
This issue has not been assessed yet.